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

ToolTip formatting

3 Answers 161 Views
Chart
This is a migrated thread and some comments may be shown as answers.
jdgoulden
Top achievements
Rank 1
jdgoulden asked on 26 May 2009, 01:40 AM
I am using a Chart to display values on the Y axis with the XAxis representing time. Everything works fine using the DateTime.GetOATime() and times appear on the X axis fine, but when I try to get the X value to appear in the tooltip I get a value like
39850.666667. I'm wondering how I can modify the Format string to display a DateTime value. The code I am using with now is

 

DataSeries lineSeries = new DataSeries() { LegendLabel = data.SeriesData[i].Label };

 

lineSeries.Definition =

new LineSeriesDefinition();

 

lineSeries.Definition.ToolTipFormat =

"Time: #X\nValue: #Y";

 

lineSeries.Definition.ShowItemLabels =

false;

 

lineSeries.Definition.ShowItemToolTips =

true;

 

 

 

I have tried to modify the ToolTipFormat string several different ways, but can't figure out a way to make this work.

Any help would be appreciated.

3 Answers, 1 is accepted

Sort by
0
Vladimir Milev
Telerik team
answered on 27 May 2009, 06:29 AM
Hi jdgoulden,

Thanks for writing. I have looked over your case and unfortunately we have to admit you have found a bug in RadChart. If you have set the IsDateTime property of your DataPoints to true then the tooltips should indeed be formatted as dates. However, due to a bug in the control if you are using custom RadChart label format expressions as the tooltip format string the values will be displayed as numbers. I have already fixed this problem, but it is too late for the Service Pack 2 release now. You can expect this problem to be resolved with the next internal build. 

Your telerik points have been updated for reporting this issue.

Regards,
Vladimir Milev
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Daniel Aquere
Top achievements
Rank 2
answered on 23 Apr 2011, 08:10 PM
Hello Everyone,

Please, I need to format my tooltips with currency format ("#Y{C}"), but, I don´t know where put the configuration. Actually appears 123456, I´d like 1.234,56.

i apreciate any help.

Thanks, best

Daniel
0
Evgenia
Telerik team
answered on 27 Apr 2011, 03:21 PM
Hi Daniel,

RadChart allows you to specify how to format the labels by the ChartArea.LabelFormatBehavior property as described in our help topic. By default it is set to HumanReadable. If you set it to None the numbers will be shown according to your Culture (with two or more delimiters):

RadChart1.DefaultView.ChartArea.LabelFormatBehavior = LabelFormatBehavior.None;
NOTE that changing the LabelsFormatBehavior will affect the whole ChartArea (the Axes, the Series, theToltips and etc.)

I hope this helps.

Best wishes,
Evgenia
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
jdgoulden
Top achievements
Rank 1
Answers by
Vladimir Milev
Telerik team
Daniel Aquere
Top achievements
Rank 2
Evgenia
Telerik team
Share this question
or