Dragging and resizing a chart

A chart size and position can be dynamically adjusted by using mouse to drag or resize. The following applet displays two line series, and dragging is enabled. The same parameter is used to enable dragging and chart resizing. To drag chart, move mouse cursor to any location within the chart area, click left button and drag. A blue outlined rectangle is displayed to help select the new area the chart will be dropped on. After moving the blue rectangle to the desired area, release mouse button, and the chart is repainted at the new location.

To resize chart, it is necessary to toggle between dragging and resizing states. To toggle chart state, double click mouse button at any location within the chart area, then proceed as explained above. While in resizing state, the lower left corner of the outlined rectangle remains fixed, whereas its vertical and horizontal dimensions changes.



<applet code="GraphApplet.class" codebase="../../demo/applets/classes" archive="GraphChart.jar" width=450 height=270>

<param name="draggable" value="yes">

<param name="3d" value="yes">
<param name="labels" value="label1,label2,label3,label4,label5,label6,label7">
<param name="title" value="The JetChart Library,Dragging and resizing a chart">
<param name="graphset0_gridon" value="yes">
<param name="graphset0_crossedgridon" value="yes">
<param name="serie1" value="line,Line Series 1,ff0000">
<param name="serie1_values" value="100,80,90,70,75,60,85">
<param name="serie2" value="line,Line Series 2,00ff00">
<param name="serie2_values" value="50,60,45,50,65,53,73">>
</applet>