I am using a Dynamic Data Display WPF chart. I am trying to set the visible datarect for the Viewport2D in a chart with a datetime axis for x- axis. How do I convert a date into a valid double value for the DataRect which I need to assign to the Visible property on the Viewport2D?
Share
Dynamic Data Display has a ConvertToDouble method used specifically for it’s chart’s axes.
Depending on the type of axis you use, you have to pass in different types, but for DateTimeAxis, it looks like this :