How to make Y-axis begin at top?

6 posts, 1 answers
  1. Kayode Leonard
    Kayode Leonard avatar
    3 posts
    Member since:
    Apr 2010

    Posted 30 Apr 2010 Link to this post

    I have a bar chart that I want the Y axis 0 to start from the top and the numbers to increase as you go to the bottom, so it's basically a regular chart but upside down.  How do I do that?
    Thanks
  2. Answer
    Ves
    Admin
    Ves avatar
    2926 posts

    Posted 05 May 2010 Link to this post

    Hi Kayode,

    Please, find attached a small example. These are the key points:
    • Populate the chart with negative values or wire the ItemDataBound event and update the e.DataPoint.YValue property
    • Populate the AxisY.DefaultLabelFormat property with a two-sections format string, so that the negative values are formatted as positive ones -- "#;#"
    • Do the same for the SeriesDefinition.ItemLabelFormat -- "#Y{#;#}"

    Hope this helps.

    Best regards,
    Ves
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Kayode Leonard
    Kayode Leonard avatar
    3 posts
    Member since:
    Apr 2010

    Posted 05 May 2010 Link to this post

    That worked.  Thanks!
  4. Yao
    Yao avatar
    8 posts
    Member since:
    May 2010

    Posted 21 Jul 2010 Link to this post

    hi, admin
    how to make x-axis begin at top?
    like this photo, thanks!
  5. Bradley
    Bradley avatar
    16 posts
    Member since:
    Aug 2010

    Posted 29 Sep 2011 Link to this post

    I would also like to know how to get the axis on top, like in the pictures Yao posted.
  6. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 04 Oct 2011 Link to this post

    Hello Bradley,

    Let me start with a small clarification here -- RadChart now supports inverse Y axis, all you need to do is set IsInverse property to true. You can find an example here. Unfortunately, placing AxisX on the top is not supported.

    Best regards,
    Ves
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top