Hi
Rodolphe,
Thanks
for using the Syncfusion products.
We
have analysed the reported requirement, and you cannot get the exact Datetime value
in DateTimeCategoryAxis just by converting FromOADate since values positioned
by category not linear, instead of you can get the nearest point value by using
following code snippet, also we have prepared a sample based on this, please
find it from the below link.
Code snippet [C#]:
private void SfChart_MouseDown(object sender,
MouseButtonEventArgs e)
{
var point = e.GetPosition(series);
double x = 0d, y = 0d,stacked;
series.FindNearestChartPoint(point,
out x, out y, out stacked);
var userProfile =
series.ItemsSource as ObservableCollection<UserProfile>;//observable
collection class where the data is set as items source for the series.
MessageBox.Show(userProfile[(int)x].TimeStamp.ToString("MMM/dd/yyyy"));//display
of datetime value where the mouse down event is clicked.
}
Please
let us know if you require further assistance on this.
Regards,
Prabakaran.
Attachment:
DateTimeCategoryAxis_6d78e95a.zip