Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide all text on y axis dc.js bar chart

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

Fig 1

like image 947
Tom Whitaker Avatar asked Mar 16 '14 20:03

Tom Whitaker


Video Answer


2 Answers

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);
like image 61
KSR Avatar answered Oct 18 '22 14:10

KSR


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

like image 33
Pronix Avatar answered Oct 18 '22 14:10

Pronix