Home › forums › Using CanvasJS › Setting x axis labels to display: none on mobile screens
Tagged: Labels, responsive design
This topic contains 1 reply, has 2 voices, and was last updated by Vishwas R 2 months ago.
I am working on a bar chart with long labels on its X axis, which means the labels become very crowded on a mobile phone screen.
Is there any way of not displaying the X axis labels once the screen is below a certain width, say less than 500 pixels?
Check out my JS fiddle.
My website uses an older version of canvas.js: v 1.9.10.
Based on the chart width, you can remove labels with the help of labelFormatter. Please take a look at this updated JSFiddle.
You must be logged in to reply to this topic.