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

x axis y axis label

3 Answers 150 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Karthik Kantharaj
Top achievements
Rank 1
Karthik Kantharaj asked on 13 Jan 2012, 10:04 AM
Hi guys
I am working in chart

http://demos.telerik.com/aspnet-ajax/chart/examples/functionality/yaxis2/defaultcs.aspx

In this chart i need to add label for x axis and y axis

                           |
   expense         |
                           |
                           |
                           |
                           ------------------------------------
                                      no of items

Like above

please guide me

Karthik.K

3 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 16 Jan 2012, 09:47 PM
Karthik:

If I understand your requirement, it seems that you are trying to set the AXIS TITLE property for the x-axis and the y-axis.

See the The Wizard Axis Tab documentation for design time settings.

If you're trying to define the titles server-side, then take a look at the Creating RadChart Programmatically - more complex example.
// Set text and line for X axis
radChart.PlotArea.XAxis.AxisLabel.TextBlock.Text = "Years";
radChart.PlotArea.XAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color =
System.Drawing.Color.Red;
radChart.PlotArea.XAxis.Appearance.Width = 3;
radChart.PlotArea.XAxis.Appearance.Color = System.Drawing.Color.Red;
// Set text and line for Y axis
radChart.PlotArea.YAxis.AxisLabel.TextBlock.Text = "%";
radChart.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color =
System.Drawing.Color.Red;
radChart.PlotArea.YAxis.Appearance.Width = 3;
radChart.PlotArea.YAxis.Appearance.Color = System.Drawing.Color.Red;

Hope this helps!
0
Accepted
Petar Marchev
Telerik team
answered on 17 Jan 2012, 04:22 PM
Hi,

You also need to set the label's Visible property to true. The below code should help.

radChart1.PlotArea.XAxis.AxisLabel.TextBlock.Text = "# of items";           
radChart1.PlotArea.XAxis.AxisLabel.Visible = true;
             
radChart1.PlotArea.YAxis.AxisLabel.TextBlock.Text = "Expense";
radChart1.PlotArea.YAxis.AxisLabel.Visible = true;


Regards,
Petar Marchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Karthik Kantharaj
Top achievements
Rank 1
answered on 18 Jan 2012, 09:52 AM
Hi Guys

Thank you

Karthik.K
Tags
Chart (Obsolete)
Asked by
Karthik Kantharaj
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Petar Marchev
Telerik team
Karthik Kantharaj
Top achievements
Rank 1
Share this question
or