Convert label value to millions

Thread is closed for posting
3 posts, 1 answers
  1. shahab
    shahab avatar
    22 posts
    Member since:
    Oct 2012

    Posted 01 May 2009 Link to this post

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

    Posted 04 May 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. shahab
    shahab avatar
    22 posts
    Member since:
    Oct 2012

    Posted 04 May 2009 Link to this post

    Thank you for a prompt reply, it did fix my issue.
    Regards
    Shahab
Back to Top