Hello,
I want to use a conditional template to show a variable number of labels (I will present for instance only 12 labels, so if there are 12 items I will show a label for each item, is there are 120 only on label for each 10 items) in the template using a function like:
…
container: “chartContainer”,
tooltip: {template: “#Date#”},
yAxis: {title: “Cost”},
xAxis: {title: “Date”,
template:function(obj, common, data){
if (obj.id%12 == 0 || obj.id == 1) return obj.Date;
return “”;
}},
In order to do so I need to know the number of items in the data collection.
Is there any property of data that tells me how many items I have?
Thanks in advance.
Javier