0

Sample chart I have built a chart using amcharts 4 and want to add if-else statement based on the number of columns/bars I want to make statements like

if(number of columns > 20)
{do something}

Is there a way to get the total number of bars?

1 Answers1

0

You can get number of data like this:

 var chart = am4core.create("chart", am4charts.XYChart); 
 if (chart.data.length >20){
  //do smt.
 }
kutlu
  • 74
  • 9