Graph Center

Thread is closed for posting
4 posts, 0 answers
  1. Paulo
    Paulo avatar
    56 posts
    Member since:
    Apr 2012

    Posted 17 May 2012 Link to this post

    How  to center the Chart into my PloatArea?  I try

    radChart1.PloatArea.Appearence.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Center;

    This way don't work.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 18 May 2012 Link to this post

    Hi Paulo,

    Try setting the  PlotArea-Appearance-Dimensions-Margins Property of RadChart.

     ASPX:
    <telerik:RadChart ID="RadChart1" runat="server"  PlotArea-Appearance-Dimensions-Margins="30" >
    .....
    </telerik:RadChart>

    Hope this helps.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Paulo
    Paulo avatar
    56 posts
    Member since:
    Apr 2012

    Posted 18 May 2012 Link to this post

    don't work. I made the code below and not work. I need the graphic in the center of the page.

    radChart1.PlotArea.Appearance.Dimensions.Margins.Top = Telerik.Charting.Styles.

     

    Unit.Percentage(20);

    radChart1.PlotArea.Appearance.Dimensions.Margins.Bottom = Telerik.Charting.Styles.

     

    Unit.Percentage(30);

    radChart1.PlotArea.Appearance.Dimensions.Margins.Left = Telerik.Charting.Styles.

     

    Unit.Percentage(5);

    radChart1.PlotArea.Appearance.Dimensions.Margins.Right = Telerik.Charting.Styles.

     

    Unit.Percentage(5);

    radChart1.PlotArea.Appearance.Dimensions.Width = 800;

  5. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 22 May 2012 Link to this post

    Hello Paulo,

     In order to set the PlotArea margin values you can use this code:

    radChart1.PlotArea.Appearance.Dimensions.Margins.Bottom = 70;
    radChart1.PlotArea.Appearance.Dimensions.Margins.Top = 70;
    radChart1.PlotArea.Appearance.Dimensions.Margins.Left = 70;
    radChart1.PlotArea.Appearance.Dimensions.Margins.Right = 70;
    //or
    radChart1.PlotArea.Appearance.Dimensions.Margins = new Telerik.Charting.Styles.ChartMargins(70, 70, 70, 70);
    (you should have used  ChartMargins instead of  Unit.Percentage(..) )

    And if you want to change the PlotArea's dimensions explicitly, you should first set the Dimensions.AutoSize property to false like this:
    radChart1.PlotArea.Appearance.Dimensions.AutoSize = false;

    Greetings,

    Petar Kirov
    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.
Back to Top