Home › forums › Using CanvasJS › How can I prevent x-axis labels from being hidden?
Tagged: columns, Labels
When I have a large amount of columns in my column chart, some labels get automatically hidden. I tried adding
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?
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.
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?
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.
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.
You must be logged in to reply to this topic.