Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Composite chart & Title
posted

Hi,

I have composite chart. I need to add title to it. I want to use BoxAnnotation.

ChartArea.BoundsMeasureType is Percentage.

I would like to resize chart's Bounds to make sure the BoxAnnotation/Title does not overlap anything on the chart.

BoxAnnotation has GetBoxSize method that returns size in pixels.

How can I know BoxAnnotation's height in percentage?

Thank you,

Alexander

  • 26458
    Offline posted

    You can use chart area's InnerBounds rectangle to determine where to place your annotation. Basically, when the chart renders itself, InnerBounds will be updated. If you set your annotation bounds to be a function of InnerBounds of the chart area, your annotation will be repositioned every time the size of the chart area changes.