Question

everyone,

I am using the AmCharts to generate graphic, but when the size of the div is not big as it wants, it will somewhat collapse labels in category axis. for example, in category axis suppose to show 1 2 3 4 5 6, instead it will show 1 3 5 in the axis. I wonder how could I either turn it off or enable the complete list of label to be display even when the div is too small or any solution that can be provided for this issue?

======UPDATE============ For reading and research convinence, I put the link where show the chart in live here In here you can see that the country name is not displayed fully in each column because the constrain of space. So again, question is that how to disable this, or somehow enable it to display all the column name in a way that fit them in or shrink the text.

Thank You!

Was it helpful?

Solution

categoryAxis.gridCount = chartData.length;
categoryAxis.autoGridCount = false;

Above code is the solution for my issue, and it should be put under code that looks like:

// AXES
// Category
var categoryAxis = chart.categoryAxis;

I just found these solution. Hope whoever had the same issue helps you out :) Enjoy!

Here's the updated fiddle

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top