Hide all text on y axis dc.js bar chart

耗尽温柔 提交于 2019-12-23 11:56:48

问题


I am creating a DC.JS based dashboard, but would like to figure out how to hide all of the text on the y axis of the bar chart as well as style the text on the x axis.

Thanks


回答1:


You should decrease ticks to zero: yourChart.yAxis().ticks(0);

Note that this does not return a reference to your chart, so you cannot chain this method. You must put it on a separate line. Like this:

var yourChart = dc.barChart('#your-chart').width(1024).height(50);
yourChart.yAxis().ticks(0);



回答2:


you should decrease ticks for axis yourChart.yAxis().ticks(0);



来源:https://stackoverflow.com/questions/22442233/hide-all-text-on-y-axis-dc-js-bar-chart

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