Add/Remove Series Without Reloading Entire Chart?


#1

Is there a way to change the number of series in a chart without calling reloadData and letting the data source’s numberOfSeriesInChart: sort it out?  


#2

You can hide a series with the SChartSeries hidden property.

Cheers,
Steve.


#3

Thanks, but hiding doesn’t eliminate the need to reload when adding a series.


#4

Steve is right, that is the easiest way to hide a data-series. You should only need to call a [chart redrawChart] to see this change take place. You do not have to reload your chart as this causes the chart to re-query its data-source.

A chart redraw is lightening fast, infact, the chart is redrawn every time you pan or zoom. The event that can take the most time is actually reloading the chart’s data from its datasource (although, this depends on how much data you are reloading).

Thanks,
Jan