tags:

views:

214

answers:

0

Good afternoon,

Wow what a title.

Basically here is the thing.

If have a time series which is not continuous.

Hence, since I use the IsXValueIndexed property of the Series (set to true) to collapse the space between the separate points.

That works fine, however I would now like to be able to recover a point's detail in from the graph (X and Y values) and display them in a label on the form.

Hence, I use the following event:

void myChart_CursorPositionChanging(object sender, CursorEventArgs e)
    {
        if (!double.IsNaN(e.NewPosition))
        {
            if (e.Axis.AxisName == AxisName.X)
            {
                lbl_selDate.Content = DateTime.FromOADate(e.NewPosition);
            }
            else
            {
                lbl_selValue.Content = e.NewPosition;
            }
        }
    }

The problem is that the date is incorrect... I cannot find the right conversion method to recover this damned timestamp.

Can you by any chance help me out?

Thanks!

Jeremie