How do get DateTime of a TrackerHitResult?

Oystein Bjorke 6 years ago 0
This discussion was imported from CodePlex

lars_fagerbakke wrote at 2013-10-25 12:49:

I've implemented MouseDown on my plot, it has a LineSeries with Y as a int type and X as a DateTime. Its displayed nicely, but when I click it i get a double as date:
Plot plot = sender as Plot;

var series = plot.GetSeriesFromPoint(new ScreenPoint(e.GetPosition(plot).X, e.GetPosition(plot).Y), 10);
var result = series.GetNearestPoint(new ScreenPoint(e.GetPosition(plot).X, e.GetPosition(plot).Y), true);
var data = result.DataPoint;
data's X should be a DateTime value, its a double, but how can i convert it back to DateTime?