I have a mschart control where I am graphing some points from a datagrid. After populating my chart I do the following code:
foreach (Series s in chart1.Series)
{
s.ToolTip = "X=#VALX, Y=#VALY";
}
This does set the tooltip, but as shown in the screen shot below, when I mouse over the point it has the wrong x value. Which is weird because the x-axis has the correct values so if you line the interval up with the point you can tell what it is, but for some reason the tooltip is wrong (but the y-value in the tooltip is correct).

Any help is appreciated.
Edit: I asked this question 6 years ago and now I know a little more about MSCharts. A couple of things that will cause this;
- Storing your data as a
Stringinstead of aDateTimeformat can cause the tooltip to not work properly. (which is what happened here, all my timestamps were being stored as strings. Don't do this, it's much better to use a Datetime). - Make sure your
ChartTypeis typeLinechart and notFastLinechart. Tool tips won't work with FastLines.
s.ToolTip = "X=#VALX{M/d/y}, Y=#VALY";? - DonBoitnotts.ToolTip = "X=#VALX{yyyy}, Y=#VALY";and it set the tooltip value to 1899. For some reason it really thinks its 1899 but my x-axis is fine, thats what I don't understand. - Baddack