SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.
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.