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

Graph Center

3 Answers 49 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Paulo
Top achievements
Rank 1
Paulo asked on 17 May 2012, 06:41 PM
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.

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 18 May 2012, 12:02 PM
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.
0
Paulo
Top achievements
Rank 1
answered on 18 May 2012, 01:38 PM
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;

0
Petar Kirov
Telerik team
answered on 22 May 2012, 02:03 PM
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.
Tags
Chart (Obsolete)
Asked by
Paulo
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Paulo
Top achievements
Rank 1
Petar Kirov
Telerik team
Share this question
or