24 Sep, 2007
Flex Charts :Resizing Bar Chart Columns
Posted by: Anca Alimanescu In: ActionScript 3.0
Resizing the columns of a bar chart will be practically done by adding to each one of the columns a graphical element that will allow the user to grab the columns of the chart with the mouse.
A canvas will be added to each of the columns contained by the chart for each series of the chart. In the example shown here, our chart has only one series.
The lines will be added by calling the createResizeLines function.
For each of the canvases, mouse up, mouse down, mouse move and mouse out events will be defined that will enable the user to start dragging and stop dragging the line canvases.
Each time the line canvases will be dragged, the columns will resize themselves according to the position of the canvases.
The new column sizes will have to be validated.
For the full source code click here.
