change y axis labels in nvd3 scatter-chart

ぃ、小莉子 提交于 2019-12-02 02:20:22

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 chart.yAxis.tickValues(['2','4','8','16','32']); to the Chart Code/Javascript tab as you have in your question, you also make the following change to the code in the Data(JSON) tab...

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 y axis.

NOTE: I assume you are looking at the Scatter / Bubble Chart.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!