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!
- Greg Knox asked 4 years ago
- You must login to post comments
Hi Greg,
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:
https://www.scichart.com/documentation/v5.x/webframe.html#Axis%20Labels%20-%20LabelProvider%20API.html
Hope this helps.
With best regards,
Oleksandr
- Oleksandr Shvets answered 4 years ago
- You must login to post comments
Please login first to submit.