How to set y axis label value without decimal point

Thread is closed for posting
7 posts, 0 answers
  1. Naresh
    Naresh avatar
    16 posts
    Member since:
    Jan 2011

    Posted 13 Jan 2011 Link to this post

    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
  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 17 Jan 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Naresh
    Naresh avatar
    16 posts
    Member since:
    Jan 2011

    Posted 10 Mar 2011 Link to this post

    Thanks for reply.

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

    The value of y axis should be dynamic.
  5. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 15 Mar 2011 Link to this post

    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!
  6. Emanuele Zambrano
    Emanuele Zambrano avatar
    21 posts
    Member since:
    Dec 2009

    Posted 03 Apr 2011 Link to this post

    set the Y axis CustomFormat to #,##0

    see also Microsoft Page Numeric Format
  7. Arjun
    Arjun avatar
    11 posts
    Member since:
    Aug 2010

    Posted 24 May 2012 Link to this post

    Hi Naresh,
    Did u resolve this issue .i am also facing same one.
    if u did plz help me ..

    Thanks in Advance.

  8. Korgman
    Korgman avatar
    3 posts
    Member since:
    Jan 2011

    Posted 12 Jul 2013 Link to this post

    Emanuele Zambrano - You are a life-saver.  Thanks for this tip!
    I used:  DChart.PlotArea.YAxis.Appearance.CustomFormat = "£#,##0";

    Works perfectly.  Many thanks!

    Barry
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017