SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
My X Axis is a TimeSpanAxisViewModel but I’d like to be able to toggle between TimeSpan and DateTime to show elapsed time versus actual time.
For example, the axis could read 00:00:00 to 01:30:00 with TimeSpan but then I could toggle the labels to read 3:45PM to 5:15PM, if the starting time was 3:45PM.
Is there a way to provide a starting DateTime and have it used on the axis labels in place of TimeSpan values?
Thanks for your inquiry. I am sorry for the late reply.
You can create a custom LabelProvider, pass in a start DateTime and change labels accordingly inside the FormatLabel() method. Also, you can override the OnBeginAxisDraw() method to know when a redraw starts.
Please take a look at the documentation regarding LabelProvider API for more info:
Hope this helps.
With best regards,
Please login first to submit.