Initializes a dynamic layer for drawing text and shapes.
This method clears the existing dynamic layer, or creates a new one if there is no existing dynamic layer. This method returned a
DrawArea object that can be used to draw on the dynamic layer. The dynamic layer can later be removed using
BaseChart.removeDynamicLayer.
The design of the dynamic layer is for drawing small, rapidly updatable contents for desktop applications. For example, the dynamic layer can be used to implement a cross-hair mouse cursor, with text showing the location of the mouse cursor. To do this, in the mouse move event handler, BaseChart.initDynamicLayer can be used to create or clear the dynamic layer. The returned
DrawArea object can then be used to draw the cross hair cursor (as two straight lines) and the text. When the mouse cursor leaves the chart,
BaseChart.removeDynamicLayer can be used in the mouse out event handler to remove the cross-hair cursor and the text.
Note that as long as the dynamic layer is not removed with
BaseChart.removeDynamicLayer, only the returned
DrawArea object should be used to draw things on the dynamic layer. No other objects should be used to draw on the chart.
A
DrawArea object that can be used to add text and shapes to the dynamic layer.
© 2012 Advanced Software Engineering Limited. All rights reserved.