I'm trying to use OxyPlot to visualize a time series and I'm using annontations to mark some points in time and value levels like minimum/maximum value and so on.
I want to achieve this in WPF with bindings and, so far, I started with the Plot
control, two axes and a data series. This works fine, but I can't find a way to bind the annotations to an ObservableCollection<Annontation>
with dynamically created annotations of all kinds.
<UserControl
...
xmlns:oxy="http://oxyplot.org/wpf"
...
>
<Grid>
...
<oxy:Plot>
<oxy:Plot.Axes>
<oxy:DateTimeAxis ... />
<oxy:LinearAxis ... />
</oxy:Plot.Axes>
<oxy:Plot.Series>
<oxy:StairStepSeries ... />
</oxy:Plot.Series>
<oxy:Plot.Annotations>
<!--
How do I bind to the ObservableCollection 'Annotations' in my ViewModel?
Note, 'Annotations' property isn't available directly in Plot, either.
-->
</oxy:Plot.Annotations>
</oxy:Plot>
</Grid>
</UserControl>