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

AutoRange Label - how to change the units

3 Answers 39 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 18 Oct 2012, 09:04 PM
Hi..
I have the following

<charting:AxisY AutoRange="True" Title="kwh"
                                                   MinorTicksVisibility="Collapsed"
                                                   MajorTicksVisibility="Visible" />


the values are like    60,000    70,000    100,000

the Y axis looks like this

100 k

70 k

60 k


How can I remove or change the 'k' on the axis?   or put   (1000) on the bottom of the Y axis

thx in advance

3 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 22 Oct 2012, 08:19 AM
Hi Jon,

Try setting the string format of the YAxis:
this.radChart.DefaultView.ChartArea.AxisY.DefaultLabelFormat = "N"; // N, F0

Greetings,
Petar Marchev
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jon
Top achievements
Rank 1
answered on 22 Oct 2012, 12:05 PM
How can I format it with commas and no decimal places.. I tried the standard C# formating but doesn't work
thx
0
Petar Marchev
Telerik team
answered on 23 Oct 2012, 08:34 AM
Hello Jon,

If you need to have a fuller control over the formatting you can check out this help topic. Here is some code to jump start you:
this.radChart.DefaultView.ChartArea.AxisY.DefaultLabelFormat = "#VAL{##,#}";

All the best,
Petar Marchev
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart
Asked by
Jon
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Jon
Top achievements
Rank 1
Share this question
or