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

Decrease margin/padding in between chart border and plot area

4 Answers 137 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael Kniskern
Top achievements
Rank 1
Michael Kniskern asked on 07 Dec 2012, 12:32 AM
Where can I find the setting/property that will adjust the size of the margin/padding between the plot area and the chart object border.  I have included a screen shot of what I am trying to accomplish.

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 07 Dec 2012, 01:57 PM
Hi Michael,

Our suggestion is to increase the Chart.PlotArea.Appearance.Dimensions.Margins property values.

All the best,
Peter
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Michael Kniskern
Top achievements
Rank 1
answered on 10 Dec 2012, 04:42 PM
I looked in the InitializeComponent() method of the report and found the following code for setting the chart plot area margins

Telerik.Reporting.Charting.Styles.ChartMargins chartMargins2 = new Telerik.Reporting.Charting.Styles.ChartMargins();
 
chartMargins2.Bottom = new Telerik.Reporting.Charting.Styles.Unit(0D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
chartMargins2.Left = new Telerik.Reporting.Charting.Styles.Unit(0D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
chartMargins2.Right = new Telerik.Reporting.Charting.Styles.Unit(0D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);chartMargins2.Top = new Telerik.Reporting.Charting.Styles.Unit(0D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
 
this.AvgScorePerQuestionChart.PlotArea.Appearance.Dimensions.Margins = chartMargins2;

When I view the report, the margins are still using the default margin setting.  Is there a bug with the setting the properties of the report in the InitializeComponent method?
0
Peter
Telerik team
answered on 11 Dec 2012, 09:02 AM
Hello Michael,

The problem you've hit might occur if you have set Skin to the chart item, which would override any custom styling and formatting you have applied. If this is the case, please apply the customization properties right after InitializeComponent in the report constructor or remove the chart skin.

All the best,
Peter
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Michael Kniskern
Top achievements
Rank 1
answered on 11 Dec 2012, 09:27 PM
Yes, I am using a skin property of the report to format the visual design of the report.  I did set the properties after the InitializeComponent method and it fixed the issue.

Thanks for your help....
Tags
General Discussions
Asked by
Michael Kniskern
Top achievements
Rank 1
Answers by
Peter
Telerik team
Michael Kniskern
Top achievements
Rank 1
Share this question
or