Hi, I have to draw shapes and lines into the background of a Plotchart. The size/position of the shapes and lines depends on the minimum and maximum of the horizontal and vertical linear axis.
My first try was to use the backgroundElements to solve this problem. I created a shape, drawed a polygon on it and added it to the backgroundElements: var shape:Shape = new Shape(); var gr:Graphics = shape.graphics; gr.moveTo(0, 20); gr.beginFill(0xFF9900, 50); gr.lineTo(0, 0); gr.lineTo(100, 0); gr.lineTo(100, 100); gr.lineTo(0, 20); gr.endFill(); backgroundElements.reverse(); backgroundElements.push( shape ); I reversed the array to keep the GridLines in the front. The polygon is visible in the background but it is scaled to fit the size of the PlotChart. The shape has to keep its scaling. How do I know the width/height of the PlotChart content area? With this information and the min/max of the x/y axis I am able to do the drawing. Any hint is very appreciated. Cheers, Sönke