Reputation: 1285
I have multiple lines in a Highcharts graph, and would like to make them appear one after another, and not all at the same time. Is that possible? I have a fiddle here.
Perhaps one approach would be to display first no line at all (how?), and then make them appear in an additional function like:
function(chart)
{
chart.series[0].drawLine({lineWidth: 1}),
chart.series[1].drawLine({lineWidth: 1}),
chart.series[2].drawLine({lineWidth: 1});
});
where I have however no idea to make them appear... Any tipp for me? Thanks so much!
Upvotes: 0
Views: 51
Reputation: 37578
You need to call addSeries one by one, i.e in setTimeout function.
setTimeout(function(){
chart.addSeries({
data: [1,2,3]
});
setTimeout(function(){
chart.addSeries({
data: [2,3,4]
});
},1000);
},1000);
Simple demo:
Upvotes: 1