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

Displaying Axis Label

3 Answers 129 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 17 Dec 2007, 07:23 PM

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

3 Answers, 1 is accepted

Sort by
0
Jafin
Top achievements
Rank 2
answered on 18 Dec 2007, 05:47 AM
Try setting:
RadChart1.PlotArea.YAxis.AutoScale = false;

0
Joe
Top achievements
Rank 1
answered on 18 Dec 2007, 03:02 PM
Thanks for the reply.  I tried setting that, it doesn't work either.
0
Ves
Telerik team
answered on 18 Dec 2007, 05:52 PM
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
Tags
Chart (Obsolete)
Asked by
Joe
Top achievements
Rank 1
Answers by
Jafin
Top achievements
Rank 2
Joe
Top achievements
Rank 1
Ves
Telerik team
Share this question
or