Convert Time stamped Axis to Double

Need help in implementing some specific function to your LightningChart Ultimate powered application? Post a question and get code snippets from other LightningChart Ultimate community members.

Moderator: Queue Moderators

Post Reply
Kountree
Posts: 21
Joined: Mon Jan 26, 2015 10:36 pm

Convert Time stamped Axis to Double

Post by Kountree » Wed Feb 25, 2015 9:39 pm

In the event that you have an X-axis that has a valuetype of DateTime, and you want to convert the X-Axis DateTime to a double, here is how to do this. It was not in the documentation.

There is a method called TimeString which accepts two parameters
  • double valueAtAxis
    string FormatStringTime
chart.ViewXY.XAxes[0].TimeString(cursor.ValueAtXAxis, "hh:mm:ss.fff");

Hope this helps

Post Reply