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

custom formatting for very large numbers

3 Answers 180 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 31 Mar 2009, 03:55 PM
we generally have charts that use very large numbers, millions, billions, trillions, etc. and would like the y-axis labels to be a custom format.

90M for 90000000
90kM for 90000000000
90MM for 90000000000000
etc.

can we plug in a custom format provider for the y-axis label formatting?

if not, is there a good way that you would recommend accomplishing this?

exponential notation formatting is not desired, we'd like to save space by not displaying the full number, but our users are used to seeing these funky formats for these very large numbers.

3 Answers, 1 is accepted

Sort by
0
Dessy
Telerik team
answered on 02 Apr 2009, 08:55 AM

Hello Steve,

Chart  YAxis provides two properties for label formatting - ValueFormat and CustomFormat.
 ValueFormat
is an Enumeration and CustomFormat can take   Standard Numeric Format  and Custom Numeric Format values.
Here is an example how to generate Custom Format Label with percentege (You should include these lines in your aspx file and replace the CustomFormat with the desirable one) :

<YAxis > 
     <Appearance CustomFormat="P">  
     </Appearance> 
</YAxis> 

Hope that helps.

Sincerely yours,

Dessy
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Wendelstam
Top achievements
Rank 1
answered on 25 May 2009, 02:14 PM
Hi.


I have an underlying datasource that displays the data as seconds and I would like to format the charts Y-Axis labels ex: mm:ss or hh:mm:ss is there any easy way to do this with something like the customformat property. I know that you support all .net format strings but havent figured out the best way to accomplice this yet.

I cant really change how the chart is populated only how it displays its data since it is an production application.

Thanks in advance.

/Johan
0
Ves
Telerik team
answered on 28 May 2009, 08:35 AM
Hello Johan,

Here is my answer in the other forum thread you have started:

I am afraid there is no intrinsic support for this. Still, you can wire BeforeLayout event of RadChart. At that moment of the control lifecycle, the axis items are already created, so you can loop through them and update the text shown.

Hope this helps.


All the best,
Ves
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.
Tags
Chart (Obsolete)
Asked by
Steve
Top achievements
Rank 1
Answers by
Dessy
Telerik team
Wendelstam
Top achievements
Rank 1
Ves
Telerik team
Share this question
or