Y Axis Formatting

Thread is closed for posting
4 posts, 0 answers
  1. Rob Diamant
    Rob Diamant avatar
    14 posts
    Member since:
    Jan 2006

    Posted 30 Apr 2009 Link to this post

    I am creating a Line chart from vb and need to manage the formatting of the Y Axis values. For example, data value is 11,000,000 so I want the Y Axis to display 11 and I will set the AxisLabel.Textblock.Text = "Revenue (Millions)".

    I was able to do this with a single series by having two columns in my dataset, one for the real value and one for the display. Then plotting the display and setting the tooltip to show the real value (as not to clutter the chart). However, now I have multiple series (4-8) and this trick no longer works, the value is always assigned to the last column of data regardless of setting the .DataYColumn.

    Any suggestions would be helpful.
    Rob
  2. Dessy
    Admin
    Dessy avatar
    73 posts

    Posted 04 May 2009 Link to this post

    Hi Rob Diamant,

    In order to achieve this, you could use the YAxis appearance properties for label formatting - ValueFormat and CustomFormat.

    ValueFormat
    is an enumeration and CustomFormat can take   Standard Numeric Formats
     and   Custom Numeric Formats   values.
    Here is an example how to generate Custom Format Label  showing the values in millions:

    <YAxis >    
         <Appearance CustomFormat="#,,">     
         </Appearance>    
    </YAxis>    
     

    Hope that 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. Rob Diamant
    Rob Diamant avatar
    14 posts
    Member since:
    Jan 2006

    Posted 27 May 2009 Link to this post

    So what format would you use to display only the million's digit only?
  4. Ves
    Admin
    Ves avatar
    2927 posts

    Posted 01 Jun 2009 Link to this post

    Hello Rob,

    I believe the answer, provided by Dessy shows it -- you can use this format string: "#,,". Does it not work on your side?

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