I seem to not be able to display date in the tool tip. Here is a snippet of the code that I have:
DataSeries ds = new DataSeries();
ds.Definition =
new SplineSeriesDefinition();
ds.Definition.ShowItemToolTips = true;
ds.Definition.ItemToolTipFormat =
"Date: #X{D}\r\nValue: #Y{F2}";
ds.Add(
new DataPoint(DateTime.Parse("07/01/2010")) { YValue = 3.134 });
ds.Add(
new DataPoint(DateTime.Parse("07/02/2010")) { YValue = 2.828 });
ds.Add(
new DataPoint(DateTime.Parse("07/03/2010")) { YValue = 2.827 });
ds.Add(
new DataPoint(DateTime.Parse("07/04/2010")) { YValue = 2.752 });
ds.Add(
new DataPoint(DateTime.Parse("07/05/2010")) { YValue = 2.696 });
ds.Add(
new DataPoint(DateTime.Parse("07/06/2010")) { YValue = 2.718 });
ds.Add(
new DataPoint(DateTime.Parse("07/07/2010")) { YValue = 2.976 });
TimeSeriesChartArea.DataSeries.Add(ds);
When the chart is generated, I see the following when hovering over a data point
Date:
Value: 3.13
As you can see, the Date is blank, while the value is displaying the correct data. I have tried several other formats (MM, yyyy, dd, etc), and all of them displayed blank.
Please help,
Dinko