IsAxisVisible property not working when binding to Model

Jun 16, 2014 at 3:26 AM
I'm using WPF and I have created my PlotModel in the ViewModel which I am binding to from XAML. However, when I do this the IsAxisVisible property does not function. The axis is always visible whether the property is set to true or false.

IsAxisVisible not working

<oxy:Plot Width="600" Height="200" Margin="0" Model="{Binding UserPlotModel}">
                            <oxy:Plot.Axes>
                                <oxy:DateTimeAxis Position="Bottom" 
                                                  StringFormat="hh:mm:ss" 
                                                  IsAxisVisible="false" 
                                                  Maximum="{Binding PlotTimeMax}" 
                                                  Minimum="{Binding PlotTimeMin}"/>
                                <oxy:LinearAxis Position="Left" IsAxisVisible="false"/>
                            </oxy:Plot.Axes>
                        </oxy:Plot>
In other plots where I am binding through the ItemSource the IsAxisVisible property works fine. It appears to be an isolated case when binding to Model. Am I doing something wrong or is there a work around for this?

IsAxisVisible Working

  <oxy:Plot Width="600" Height="200" Margin="0">
                            <oxy:Plot.Axes>
                                <oxy:DateTimeAxis Position="Bottom" StringFormat="hh:mm:ss"/>
                                <oxy:LinearAxis Position="Left" IsAxisVisible="True"/>
                            </oxy:Plot.Axes>
                            <oxy:LineSeries ItemsSource="{Binding PartsPerHourDataPoints}"/>
                        </oxy:Plot>
Coordinator
Jun 16, 2014 at 8:59 AM
The Model property should override all the properties and collections (annotations, axes, series) of the PlotView, so I think this is working as intended.
But I have created https://oxyplot.codeplex.com/workitem/10222, I think this should generate a runtime error (exception).
See also https://oxyplot.codeplex.com/workitem/10128
Jun 19, 2014 at 2:57 AM
Is there a way to create a RectangleBarSeries without using the Model property? I've been experimenting but haven't found a way around this issue.