You must be logged in to post your query.
Home › Forums › Chart Support › Hide axis label
Hi,
I am using this https://canvasjs.com/jquery-charts/column-chart/ . Is there anyway to hide the label, because I had about 22 bars to create for this chart. And the label unable to fit. I only want to remain the mouse over label.
@9mthsnafter,
You can use labelFormatter to hide axis-labels. You can use tickLength and lineThickness to hide tick and axis-lines respectively. Below is the code-snippet.
axisX:{ gridThickness: 0, tickLength: 0, lineThickness: 0, labelFormatter: function(){ return " "; } }, axisY:{ gridThickness: 0, tickLength: 0, lineThickness: 0, labelFormatter: function(){ return " "; } },
Please take a look at this JSFiddle for complete code.
— Vishwas R Team CanvasJS
Is it possible to hide the axis label but still display a crosshair label?
I’ve forked your fiddle to include a crosshair but it seems the axis labelFormatter overrides the crosshair’s labelFormatter.
http://jsfiddle.net/elcollie/5bn638gh/
@elcollie,
Thanks for reporting the use-case. We will look into the issue and fix it in future versions.
To work-around this issue, you can set axis labelFontColor to “transparent” instead of using labelFormatter to hide the axis labels. Please take a look at this updated JSFiddle.
Works like a charm!
Thanks!
[UPDATE]
We have just released v3.0 Beta-1 with this improvement. Please refer to the release blog for more information. Do download the latest version from download page & let us know your feedback.
You must be logged in to reply to this topic. Login/Register