You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are issues with excessively large numbers as well. This will need a bit of thought I expect.
Is there a specific reason you need DateTimeAxis rather than TimeSpanAxis? From your picture, I'd expect the latter would be a better choice for your scenario, and should avoid a whole class of issues like this, but keen to know if there's an issue that makes that difficult for you.
To be honest, I haven't tried to use TimeSpanAxis. The objective here is to provide a user with a quasi-Gantt chart showing absolute start and stop times for pumping fluids to and from various storage tanks. Having the capability to show exact dates on the chart above is critical for my design specification for this project, and if TimeSpanAxis supports that, I'm happy to give it a go. The case I show above, wherein I don't have a good start time, also needs to be handled (unfortunately).
For now, I'm getting around this by setting AbsoluteMinimum and AbsoluteMaximum bounds on the DateTimeAxis, as it seems that the error only occurs when trying to render ticks that don't resolve from doubles to DateTimes.
If you need dates, then you will indeed need DateTimeAxis: just seemed odd that you'd have a series start at the epoch so I thought maybe you just wanted only the time component.
Steps to reproduce
Platform:
.NET version: Framework 4.8
OxyPlot version: 2.1.2
I'm using the WPF version of OxyPlot, but this seems to be a core issue
Behavior
The PlotView will crash with an exception related to creating an invalid DateTime.
1a35011a984949c0a95fe1355f983517.mp4
The text was updated successfully, but these errors were encountered: