SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0
0

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!

Version
5.4.0.12119
  • You must to post comments
0
0

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

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.