How can i get the size of PlotArea?

Thread is closed for posting
2 posts, 0 answers
  1. Chris
    Chris avatar
    11 posts
    Member since:
    Dec 2004

    Posted 11 Mar 2009 Link to this post

    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
  2. Ves
    Admin
    Ves avatar
    2927 posts

    Posted 13 Mar 2009 Link to this post

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