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

Convert label value to millions

2 Answers 161 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
shahab
Top achievements
Rank 1
shahab asked on 01 May 2009, 06:08 AM

How can I format the value in the chart to display as $8.7M when my data is 879773.
I have currently set it to  the following:

 

s.DefaultLabelValue =

"#Y{#,##0}"

Thank you
shahab

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dessy
Telerik team
answered on 04 May 2009, 11:07 AM
Hi shahab,

RadChart provides two  properties for label formatting  (Axis labels and item labels)- ValueFormat and 
CustomFormat.
ValueFormat
is an Enumeration and CustomFormat  takes   
Standard Numeric Formats
and   Custom Numeric Formats   values.
For example you can set CustomFormat property to 'C0' and then all YAxis  values will be displayed in currency without decimals:
RadChart.PlotArea.YAxis.Appearance.CustomFormat = "C0";
You can customize item labels value by setting value to DefaultLabelValue property  and using Standard Numeric Formats and Custom Numeric Formats.

Hope this helps.


Best wishes,
Dessy
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
shahab
Top achievements
Rank 1
answered on 05 May 2009, 12:36 AM
Thank you for a prompt reply, it did fix my issue.
Regards
Shahab
Tags
Chart (Obsolete)
Asked by
shahab
Top achievements
Rank 1
Answers by
Dessy
Telerik team
shahab
Top achievements
Rank 1
Share this question
or