7
votes

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!

1
so whoever just voted down, plz provide some productive advise instead of "troll" votes. Thank Youweia design
Of course, if you never used AmCharts it will be UNCLEAR for you. but if anyone used it before, he or she will know what I am talking about, and I am having trouble to find out the code related to how the chart javascript is acting the way it does. I don't really need to post any code since all the code and sample is widly available.weia design
FWIW, I have researched it, and it doesn't appear to be something you can modify by simply changing options or parameters for the chart. Therefore, the solution is going to involve overriding private methods, if that is even possible with said plugin. Is the source of this plugin readily available? If not, it's going to be tough to override a minified private method.Kevin B
Its an open source js script app, you can download it from their official site everything in one click.weia design
No, it is minified inside the download. It does not appear to be open source.Kevin B

1 Answers

10
votes
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