I am creating an application in OxyPlot. I would like for the minimum point on the x-axis to remain at zero, while the maximum point continues to grow as new data is populated on the graph. Currently what is happening, is that the graph seems to look like a sliding window instead, something like:
Here is what the graph looks like now:
[------------]
0 100
and 25 seconds later...
[------------]
25 125
Here is what I actually want:
[-------------]
0 100
and 25 seconds later...
[-------------]
0 125
I looked into some of the methods/properties of the LinearAxis (which I am using to define my x-axis), and the closest thing I could find was the AbsoluteMinimum property, which I've set to 0. Setting the AbsoluteMinimum property, did not seem to do the trick however. Any ideas?
I added that property in my XAML code:
<oxy:Plot.Axes>
<oxy:LinearAxis Style="{DynamicResource PlotAxisStyle}" Position="Bottom" Minimum="1" />
<oxy:LinearAxis Style="{DynamicResource PlotAxisStyle}" Position="Left" Minimum="0" />
</oxy:Plot.Axes>
This works fine for me, but I am only using values up to 100 in my x-axis (Bottom position)
You can use Minimum property, and set its equal 0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With