Custom series - Error in XAML: The following type was expected: "Series"

Sweet 4 years ago updated 4 years ago 0

I've tried to create my own series, based on the HighLowSeries. I wanted a chart where I could simply plot min, max and avg values for each point, like this:

My class inherits XYAxisSeries. Yet I cannot add it to the series in my control, "Invalid type: expected types are 'Collection<Series>' or 'Series', actual type is 'MinMaxAverageSeries'."

If I try to add the series to a PlotModel in code, it works.


<oxy:Plot Grid.Row="1">

<oxy:Plot.Series >

<charting:MinMaxAverageSeries ItemsSource="{Binding Data}" />

Also, is there a way to achieve a similar chart without creating my own series? I Looked at BoxPlotSeries, but it seemed to have a lot of additional stuff that didn't quite fit.