d3.js - How to get D3 Multiple Y-Axes Ticks to Line Up? -


i'm trying show multiple y-axes on time series multiple lines. you'll see in screenshot on right there y-axis tick labels shown each of 4 color-coded lines.

i want show 6 ticks/labels. depression, sleep disturbance, daily health perfect! showing 6 labels. want "steps" show on exact same marks. in case, need 0, 12000, 26000, 39000, 52000, , 65000. roughly. idea. cannot figure out how of y-axes show in count of 6 ticks line nice.

note: there many time series display, , depending on user's data, y-domains may different (one person may have 60,000 steps, user 5,000). information determined programmatically , dynamically, can't hard code things.

any on do?

d3 custom programmed multiple y-axes time series

you should use .tickvalues(), set axis' values explicitly. based on person's data, create array of 6 values [0, (max * 1/5), (max * 2/5), ..., (max * 5/5)], , use argument tickvalues


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

.htaccess - ERR_TOO_MANY_REDIRECTS htaccess -