SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & 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 recently made the switch from using RenderableSeries directly to using the RenderableSeriesViewModel. We used to add LegendData manually when we added a series to the graph (as we don’t want all the series to show up on the legend).
But looking at how legends are displayed, it requires the RenderableSeries object itself, which of course I no longer have access to.
How can I go about adding custom SeriesInfo without any RenderableSeries.
Thank you for pointing this out to us. You are right, current MVVM API doesn’t allow selecting specific series for a legend. There is a couple of workarounds I would suggest trying.
You could override the IsSeriesValid method of LegendModifier. In method override just return “False” for those series you don’t want to appear in a legend. You can distinguish them using the Tag property of RenderableSeries or DataSeries, or DataSeries.SeriesName.
Another possible solution can be creating a custom RenderableSeries based on any existing type and overriding GetSeriesInfo() there. Then you can create a ViewModel for it and use with MVVM API.
Hope this helps!
Please login first to submit.