Displaying Axis Label

Thread is closed for posting
4 posts, 0 answers
  1. Joe
    Joe avatar
    24 posts
    Member since:
    Dec 2006

    Posted 17 Dec 2007 Link to this post

    I'm trying to display a Label on the YAxis of the chart I'm working with and it does not seem to be working, so I must be missing something here.  My chart is horizontal. Once I run this code, it only displays numeric values at each tick on the axis, but I'm looking to see a Label across the bottom on the entire Axis that says 'Test Label'

    Here is my code:

    RadChart1.SeriesOrientation =

    ChartSeriesOrientation.Horizontal;

    ChartSeries

    cs = new ChartSeries();

    ChartSeriesItem csi = new ChartSeriesItem();

    csi.YValue = 7;

    cs.Items.Add(csi);

    RadChart1.PlotArea.YAxis.AxisLabel.Visible =

    true;

    RadChart1.PlotArea.YAxis.AxisLabel.TextBlock.Text =

    "Test label";

    RadChart1.Series.Add(cs);


    Thanks
    Steve

  2. Jafin
    Jafin avatar
    86 posts
    Member since:
    Nov 2005

    Posted 17 Dec 2007 Link to this post

    Try setting:
    RadChart1.PlotArea.YAxis.AutoScale = false;

  3. Joe
    Joe avatar
    24 posts
    Member since:
    Dec 2006

    Posted 18 Dec 2007 Link to this post

    Thanks for the reply.  I tried setting that, it doesn't work either.
  4. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 18 Dec 2007 Link to this post

    Hi Steve,

    You need to set this label visibility to true. Try it like this:

    RadChart1.PlotArea.YAxis.AxisLabel.TextBlock.Visible = true;

    I hope this helps.


    Regards,
    Ves
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top