score:4

Accepted answer

You need to add chart.redraw();

function createChart(){
    s1 = chart.addSeries({data:randomData(20),name:'Line'+i},false);
    chart.redraw();
}

score:8

The problem is that you set the set parameter of addSeries as false.
In this case you have to set as true and it will redraw the chart after add the new serie.

For one serie.

chart.addSeries({data:randomData(20),name:'Line'+i},true);

Like the following example.
jsfiddle

Or if you want to add more than one serie in each click you just have to change one thing.

function createChart(seriesData){
    s1 = chart.addSeries(seriesData,false);
}

$('#create').click(function(){
    createChart(seriesData);
    chart.redraw();
});

You will add all of your series and after that redraw the chart, so you don't have to redraw your chart each time you add a new serie.


Related Query

More Query from same tag