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

How can i get the size of PlotArea?

1 Answer 101 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 11 Mar 2009, 10:17 AM
How can i get (with vb.net) the width and the height of the plotarea in pixel when i have set the autosize feature?
F.e. i tried to get the margin: RadChart1.PlotArea.Appearance.Dimensions.Margins.Right.Value
But i get always the same value f.e. when i switch on / of the legend ... which changes the margins ...

Thanks and best regards
Christian

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 13 Mar 2009, 01:14 PM
Hi Chris,

RadChart performs the layout calculations only once. RadChart exposes two events - BeforeLayout  and PrePaint. The former is fired before the layout is calculated, while the latter is fired after that and before the actual image rendering occurs. That said, you can retrieve the plot area size in the PrePaint event handler. However, you will not be able to take advantage of this size in scenarios related to RadChart layout, as it has already been calculated and any updates in chart elements size and position will not be applied.

Best regards,
Ves
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Chart (Obsolete)
Asked by
Chris
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or