SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
I want to add series dynamicaly in code behind. I am creating my own LegendData which needs to add series to the chart.
I was thinking of adding all series at once and make them invisible and then when i want to show one i just change the IsVisible flag.
Will this result in good performance, or would it be faster if I add and remove the series each time i want to see them?
Well, your chosen approach is good enough, as invisible series don’t take part in rendering, so it won’t hurt the performance of a chart. Also you can choose lazy data loading approach, and add every new series on demand.
For more info about performance optimisation, please, refer to the Performance Tips and Tricks article.
FYI, we have an example of adding/removing series dynamically from code behind. Please, take a look at the Add/Remove Data Series example.
Hope this helps!
Please login first to submit.