I am trying to have my own y axis labels for the bubble chart in nvd3. Currently the labels are [1,2,3,4,5]. I want them to be displayed as [2,4,8,16,32]. I found the following function,
But the labels are not being changed here. I am unable to understand why.
These tick values will not have any effect if the
y values themselves are not within the 2-32 range. Right now that chart only has
y values up to 2+.
So, if in addition to adding
y: Math.floor(Math.random() * 33) // change from y: random()
...then you will see the tick values you specified (2-32) show up in the
NOTE: I assume you are looking at the Scatter / Bubble Chart.
©2020 All rights reserved.