Hi!
I would like to plot a series as a solid line AND include error bars. The way I do this now is to define a single series:
var fSeries = new HlcDataSeries<double, double>();
fSeries.SeriesName = $"My Series!";
And then two different ViewModels:
var fLineVm = new LineRenderableSeriesViewModel();
var fErrorVm = new ErrorBarsRenderableSeriesViewModel();
And set the data series to belong to both:
fLineVm.DataSeries = fSeries;
fErrorVm.DataSeries = fSeries;
This looks ok. But when I show the legend, I see “My Series” in the legend twice, and I can control the error bars separately from the line series.
What I want to happen is that I see the series a single time in the legend and if I turn it off (uncheck it) everything disappears.
Right now, i’m adding those two ViewModels to an ObservableCollection of IRenderableSeriesViewModels and then SeriesBinding to display them.
- David Stahl asked 5 years ago
- You must login to post comments
Hi David,
Thanks for your inquiry.
I’ll copy the answer from the support ticket here:
You will have to deal with two RenderableSeries anyway. However, you can achieve the desired behaviour of the LegendModifier. You can set the attached property LegendModifier.IncludeSeries to False for the ErrorBarsRenderableSeriesViewModel to exclude it from the LegendModifier. Please take a look at the following documentation for more info:
https://www.scichart.com/documentation/v5.x/webframe.html#LegendModifier.html
There is also IsVisible property for both RenderableSeries. If you bind these properties both RenderableSeries will hide if you uncheck one of them in the LegendModifier.
Hope this helps.
- Oleksandr Shvets answered 5 years ago
- You must login to post comments
Please login first to submit.