3
votes

In amCharts column chart, labels on category axis are alternately hidden when user reduces the browser width.

enter image description here

Please refer JSFiddle in the comments (When the JSFiddle output box is dragged inwards, amCharts starts hiding alternative labels on category axis as shown in screenshot above).

How to disable auto hiding of labels on category axis? Requirement is to scale down the chart (without hiding any label), when user reduces the browser size. This issue occurs when you add more columns beyond certain count.

2
JSFiddle for convenience: jsfiddle.net/08rbtw4q/1Xplora

2 Answers

8
votes

There is a way to increase the number of labels shown, however it won't force them to show, when they're out of the renderrange of the chart. (I've also tested forceShowField, but this doesn't work for me)

So the way how you could do it is setting the minHorizontalGap to zero (or at least a lower value than default which is 75). Check docs and your modified JSFiddle.

3
votes

"categoryAxis": { "gridPosition": "start", autoWrap:false, minHorizontalGap:0, }