x axis y axis label

Thread is closed for posting
4 posts, 1 answers
  1. Karthik Kantharaj
    Karthik Kantharaj avatar
    101 posts
    Member since:
    Mar 2010

    Posted 13 Jan 2012 Link to this post

    Hi guys
    I am working in chart


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

       expense         |
                                          no of items

    Like above

    please guide me

  2. jumpstart
    jumpstart avatar
    479 posts
    Member since:
    Nov 2011

    Posted 16 Jan 2012 Link to this post


    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 =
    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 =
    radChart.PlotArea.YAxis.Appearance.Width = 3;
    radChart.PlotArea.YAxis.Appearance.Color = System.Drawing.Color.Red;

    Hope this helps!
  3. DevCraft R3 2016 release webinar banner
  4. Answer
    Petar Marchev
    Petar Marchev avatar
    968 posts

    Posted 17 Jan 2012 Link to this post


    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;

    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
  5. Karthik Kantharaj
    Karthik Kantharaj avatar
    101 posts
    Member since:
    Mar 2010

    Posted 18 Jan 2012 Link to this post

    Hi Guys

    Thank you

Back to Top