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

StackOverflow https://stackoverflow.com/questions/16652050

  •  30-05-2022
  •  | 
  •  

Вопрос

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!

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top