0

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!

luftikus143
  • 1,285
  • 3
  • 27
  • 52
  • 2
    You can [add series to an existing chart](http://stackoverflow.com/questions/14166561/adding-new-highchart-series) one by one, with a timeout. – David Hedlund Jun 13 '16 at 08:50

1 Answers1

1

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:

Sebastian Bochan
  • 37,348
  • 3
  • 49
  • 75