You must be logged in to post your query.
Home › Forums › Chart Support › How do you hide labels?
Tagged: hide labels
I looked everywhere and I’m not able to find it.
1) This is mostly about both index labels and axis labels. Is there a switch anywhere?
2) Same question for all pie labels, what if we don’t want any of them?
3) As a more broader issue, is there a simple switch somewhere to hide both axes, with all their labels and grid lines?
Thanks, Cris
Hi Cristi,
By default the indexLabel is not shown, In case you would like to show the indexLabel, you can use indexLabel property to show some content (Eg: x-value or y-value) To hide the axis labels you can use properties like labelFontSize or labelformatter. I would recommend you to use labelFormatter for your requirement.
In Pie chart, only if you provide label property in the dataPoint, the indexLabels will be shown. By default the indexLabels are not shown.
You can use the properties like gridThickness(to hide the grid lines), tickLength(to hide the axis ticks), lineThickness(to hide the axis line) and labelFormatter(to hide the labels) for both X and Y axis in order to hide the axes completely. Please take a look at the code snippet below,
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 an example with complete code on charts with hidden axes.
Thanks Ash, it works great! I tried some of these properties, but I was missing others :)
When you have another minute, I would appreciate a fix for the pie as well.
Thanks so much (and great product BTW!), Cris
You must be logged in to reply to this topic. Login/Register