Home forums Using CanvasJS Setting x axis labels to display: none on mobile screens

This topic contains 1 reply, has 2 voices, and was last updated by  Vishwas R 6 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #23499

    Hi,

    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.

    #23501

    Michael,

    Based on the chart width, you can remove labels with the help of labelFormatter. Please take a look at this updated JSFiddle.


    Vishwas R
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.