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

How to make Y-axis begin at top?

5 Answers 67 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Kayode Leonard
Top achievements
Rank 1
Kayode Leonard asked on 30 Apr 2010, 05:07 PM
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

5 Answers, 1 is accepted

Sort by
0
Accepted
Ves
Telerik team
answered on 05 May 2010, 11:50 AM
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.
0
Kayode Leonard
Top achievements
Rank 1
answered on 05 May 2010, 08:52 PM
That worked.  Thanks!
0
Yao
Top achievements
Rank 1
answered on 21 Jul 2010, 11:13 AM
hi, admin
how to make x-axis begin at top?
like this photo, thanks!
0
Bradley
Top achievements
Rank 1
answered on 29 Sep 2011, 03:09 PM
I would also like to know how to get the axis on top, like in the pictures Yao posted.
0
Ves
Telerik team
answered on 04 Oct 2011, 08:36 AM
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 >>

Tags
Chart
Asked by
Kayode Leonard
Top achievements
Rank 1
Answers by
Ves
Telerik team
Kayode Leonard
Top achievements
Rank 1
Yao
Top achievements
Rank 1
Bradley
Top achievements
Rank 1
Share this question
or