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

itemtooltipformat show .mil instead of 1.000.000

3 Answers 61 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Jonam
Top achievements
Rank 1
Jonam asked on 24 Jan 2011, 02:28 PM
I have two charts. Both of them i set the tooltip.

sm5.SeriesDefinition.ItemToolTipFormat = "mytext:" +

 

": #Y";

in one chart i see the amount like 1.2 mil. and the other displays 1.200.000. How do i control this behaviour with the formats?

kind regards,

Jonam

 

3 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 26 Jan 2011, 03:44 PM
Hello Jonam,

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.)

All the best,
Evgenia
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Jonam
Top achievements
Rank 1
answered on 26 Jan 2011, 04:32 PM
Hello,

i set the property fo humanReadable. As you can see the axis show the human readable format but the tooltip still gives a regular number. Any other settings that i am missing?
0
Evgenia
Telerik team
answered on 31 Jan 2011, 05:01 PM
Hello Jonam,

You can follow our help topic and set Custom Format Strings for the ItemTooltips.
For example you can use this format string to represent the Tooltips in Human Readable format:
seriesMapping.SeriesDefinition.ItemToolTipFormat = "#DATAITEM.Value1{0,, mil}";
Each "," delimiter divides the value by 1000 and the "mil" string is appended to the format.

To represent the values in this format (for example: 1,234,567) you can use this format string:
seriesMapping.SeriesDefinition.ItemToolTipFormat = "#DATAITEM.Value1{#,###,##0}";

All the best,
Evgenia
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
Chart
Asked by
Jonam
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Jonam
Top achievements
Rank 1
Share this question
or