This is a migrated thread and some comments may be shown as answers.
How to set y axis label value without decimal point
6 Answers 151 Views
This is a migrated thread and some comments may be shown as answers.
Naresh
Top achievements
Rank 2
Naresh asked on 13 Jan 2011, 12:47 PM
Hi,

I'm using RadChart to display the graphical notation.
How to avoid the decimal values in Y Axis label value.

Please find the Screenshot and Give me a solution.

Thanks in advance

6 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 17 Jan 2011, 09:20 AM
Hello Nagarajan,

One possible option to handle this setup would be to format the values for the axis. Additional information on this is available in the following article:

http://www.telerik.com/help/aspnet-ajax/understandingelementsaxislabels.html

I hope this gets you started properly.

Regards,
Yavor
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Naresh
Top achievements
Rank 2
answered on 10 Mar 2011, 06:52 AM
Thanks for reply.

i dont want to set max and min value for y axis.

The value of y axis should be dynamic.
0
Yavor
Telerik team
answered on 15 Mar 2011, 10:02 AM
Hello Nagarajan,

Basically, you can set the format string to one of the predefined values like this:

protected void Page_Load(object sender, EventArgs e)
{
RadChart2.PlotArea.YAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.Currency;
}

You can also specify the length of the text by setting:

RadChart2.PlotArea.YAxis.Appearance.TextAppearance.MaxLength = 2;

Yet another aproach would be to directly access the label value:

RadChart2.PlotArea.YAxis.Items[3].TextBlock.Text

I hope one of these options help. Let me know if further questions arise.

Regards,
Yavor
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Emanuele
Top achievements
Rank 2
answered on 03 Apr 2011, 06:13 PM
set the Y axis CustomFormat to #,##0

see also Microsoft Page Numeric Format
0
Arjun
Top achievements
Rank 1
answered on 24 May 2012, 11:38 AM
Hi Naresh,
Did u resolve this issue .i am also facing same one.
if u did plz help me ..

Thanks in Advance.

0
MustrumRidcully
Top achievements
Rank 2
answered on 12 Jul 2013, 01:27 PM
Emanuele Zambrano - You are a life-saver.  Thanks for this tip!
I used:  DChart.PlotArea.YAxis.Appearance.CustomFormat = "£#,##0";

Works perfectly.  Many thanks!

Barry
Asked by
Naresh
Top achievements
Rank 2
Answers by
Yavor
Telerik team
Naresh
Top achievements
Rank 2
Emanuele
Top achievements
Rank 2
Arjun
Top achievements
Rank 1
MustrumRidcully
Top achievements
Rank 2
Share this question
or