I am struggling with several issues regarding OxyPlot in a WPF project.
First off, I can use the Plot class or the PlotView class. What is the difference between these two classes?
Ideally, I want to use data binding for the Model (or at least parts of it) and for the data.
If I use PlotView, I can use Binding for the model, something like this:
<oxy:PlotView Model="{Binding Model}"/>
If I use Plot, I can use data binding for the data, something like
<oxy:Plot>
<oxy:Plot.Series>
<oxy:LineSeries ItemsSource="{Binding Points}" />
</oxy:Plot.Series>
</oxy:Plot>
I can get both of these to work, but is there a way to use Binding for both the Model and the Data?
If I use the Plot class and Binding for the data, I would at least like to use Binding for the LineColor, like this
<oxy:Plot>
<oxy:Plot.Series>
<oxy:LineSeries ItemsSource="{Binding Points}"
DataFieldX="X"
DataFieldY="Y"
StrokeThickness="2"
MarkerSize="0"
LineStyle="Solid"
Color="{Binding LineColor}"
MarkerType="None"/>
</oxy:Plot.Series>
</oxy:Plot>
I can't get this to work at all. The curve is always green. My LineColor property is defined with the type OxyColor. Is this the wrong type?
I know that I have asked several questions in the same posting, but I think that they are very closely related.