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?
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?
You can get number of data like this:
var chart = am4core.create("chart", am4charts.XYChart);
if (chart.data.length >20){
//do smt.
}