custom formatting for very large numbers

Thread is closed for posting
4 posts, 0 answers
  1. Steve
    Steve avatar
    17 posts
    Member since:
    Jul 2012

    Posted 31 Mar 2009 Link to this post

    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

    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.
  2. Dessy
    Dessy avatar
    73 posts

    Posted 02 Apr 2009 Link to this post

    Hello Steve,

    Chart  YAxis provides two properties for label formatting - ValueFormat and CustomFormat.
    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">  

    Hope that helps.

    Sincerely yours,

    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. Wendelstam
    Wendelstam avatar
    48 posts
    Member since:
    Feb 2006

    Posted 25 May 2009 Link to this post


    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.

  4. Ves
    Ves avatar
    2926 posts

    Posted 28 May 2009 Link to this post

    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,
    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.
Back to Top