Formatting axis labels

Thread is closed for posting
4 posts, 0 answers
  1. Vivian Hu
    Vivian Hu avatar
    3 posts
    Member since:
    Feb 2010

    Posted 11 Feb 2010 Link to this post

    Hi,

    I have a horizontal bar chart. X-axis (the vertial one) shows 1, 2, 3, 4. And the Y-axis (the horizontal one) shows 0, 0.1, 0.2, 0.3

    I tried to format the Y-axis labels as percentage with 1 decimal, as following:

    myChart.PlotArea.YAxis.Appearance.CustomFormat = "#.0%"
    It didn't work. Actually, I've tried in several ways, it kept showing 0.00%  10.00% ... Always gave me 2 decimals. However, when I tried it on the X-axis, it worked (gave me 100.0%  200.% ... 400.0%)
    Anybody knows what's wrong?

    Second, could anyone please tell me how to hide the axis labels? I don't want to show 1, 2, 3, 4 along the X-axis.

    Thanks,
    Vivian

  2. Vivian Hu
    Vivian Hu avatar
    3 posts
    Member since:
    Feb 2010

    Posted 11 Feb 2010 Link to this post

    I've already found the answer to the 2nd:

    .PlotArea.XAxis.Appearance.LabelAppearance.Visible =

    False

     


  3. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 15 Feb 2010 Link to this post

    Hello Vivian,

    The line you have provided seems to work fine for me. Please, make sure you have not set the myChart.PlotArea.YAxis.Appearance.ValueFormat property  to Telerik.Charting.Styles.ChartValueFormat.Percent. Leave the CustomFormat property only.

    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.
  4. Vivian Hu
    Vivian Hu avatar
    3 posts
    Member since:
    Feb 2010

    Posted 17 Feb 2010 Link to this post

    Thanks a lot. In the chart wizard, I had set the axis value format to percent. I've already set it back to none, but it didn't work. Then I changed a skin, everything is fine now. I guess the system restored its default settings.

    Thanks,

    Vivian

Back to Top