Chart xAxis

Thread is closed for posting
4 posts, 0 answers
  1. Eric Pierce
    Eric Pierce avatar
    2 posts
    Member since:
    Dec 2009

    Posted 20 Jan 2010 Link to this post

    I am using a bar chart with 3 stacked bars and a line, so 4 series total.   The xAxis label is going right through the xAxis, i really need to move the xAxis label down about 50px so it sets below the xAxis.


    sample if ______________________ is the xAxis and 12345 is the label.


      2
    __3_____________________________________
         4
           5

    I am setting the following values.

                radChart.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 45
                radChart.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.Black; 
                radChart.PlotArea.XAxis.AxisLabel.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Bottom; 
                radChart.PlotArea.XAxis.AxisLabel.Appearance.Position.Auto = false
                radChart.PlotArea.XAxis.AxisLabel.Appearance.Position.X = 200
                radChart.PlotArea.XAxis.AxisLabel.Appearance.Position.Y = 125

    Ideas?
  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 22 Jan 2010 Link to this post

    Hi Eric,

    You can take advantage of RadChart's automatic layout calculation -- just set RadChart.AutoLayout=true and RadChart will arrange the items for you. You can find more details here:

    Best regards,
    Ves
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Eric Pierce
    Eric Pierce avatar
    2 posts
    Member since:
    Dec 2009

    Posted 22 Jan 2010 Link to this post

    The auto does not work.  When i set to auto all of the labels for the xAxis are all right on top of each other.  Is there no way to move the xAxis labels down in respect to the xAxis.


  4. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 27 Jan 2010 Link to this post

    Hello Eric,

    I am not sure about your specific scenario and why the labels would be placed on top of each other. You can use this line to set the labels alignment:

    RadChart1.PlotArea.XAxis.Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Top;

    In this case you will probably need to adjust the PlotArea Margins.

    Regards,
    Ves
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top