This is a migrated thread and some comments may be shown as answers.

ItemToolTipFormat Date

1 Answer 66 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Dinko
Top achievements
Rank 1
Dinko asked on 16 Jul 2010, 09:02 PM
Hello,

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

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 21 Jul 2010, 12:44 PM
Hi Dinko,

Please, find attached a sample application, which demonstrates how to achieve this.

Hope this helps.

Sincerely yours,
Nikolay
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart
Asked by
Dinko
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or