Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Chart > x axis y axis label

Answered x axis y axis label

Feed from this thread
  • Karthik Kantharaj Intermediate avatar

    Posted on Jan 13, 2012 (permalink)

    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

    Reply

  • jumpstart Master avatar

    Posted on Jan 16, 2012 (permalink)

    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!

    Reply

  • Answer Petar Marchev Petar Marchev admin's avatar

    Posted on Jan 17, 2012 (permalink)

    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

    Reply

  • Karthik Kantharaj Intermediate avatar

    Posted on Jan 18, 2012 (permalink)

    Hi Guys

    Thank you

    Karthik.K

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Chart > x axis y axis label
Related resources for "x axis y axis label"

ASP.NET Chart Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]