Home Forums Chart Support How can I prevent x-axis labels from being hidden?

How can I prevent x-axis labels from being hidden?

Viewing 5 posts - 1 through 5 (of 5 total)
  • #29029

    When I have a large amount of columns in my column chart, some labels get automatically hidden. I tried adding

    
    axisX: {
              labelAngle: 90,
            },
    

    but it still hides half of the labels, even though adding that angle gives enough room so it shouldn’t need to hide any labels. Is there a way to prevent labels from being auto-hidden?

    #29030

    What Happens when you zoom to the graph? This could be because it automatically tries to fit labels it self so text would not overlap. Just add legend instead.

    • This reply was modified 4 years, 6 months ago by Saulius.
    • This reply was modified 4 years, 6 months ago by Saulius.
    #29056

    @user12947,

    Can you kindly create a sample project reproducing the issue and share it with us over Google-Drive or Onedrive along with the sample data so that we can look into the code, run it locally to understand the scenario better and help you resolve?


    Shashi Ranjan
    Team CanvasJS

    #29062

    @ShashiRanjan

    See my example here: https://jsfiddle.net/bfz3x9ku/3/

    There is room to display all the labels, but some of them still get hidden automatically.

    #29091

    @user12947,

    From the JSFiddle shared above, we can observe that there are a couple of labels with more characters because of which some of the axis labels are skipped to avoid overlapping. This can be customized to show all the labels using interval property.

    In your case, setting the axisX interval as 1 should work fine. Please take a look at this updated JSFiddle for the same.


    Shashi Ranjan
    Team CanvasJS

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

You must be logged in to reply to this topic.