Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Am Charts Javascript version, does not show complete number of lables on category axis

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!

like image 678
weia design Avatar asked May 20 '13 14:05

weia design


1 Answers

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

like image 189
weia design Avatar answered Nov 20 '22 01:11

weia design