IT Reflexions

24 Sep, 2007

Flex Charts :Resizing Bar Chart Columns

Posted by: Anca A. In: Code Samples


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.

No Responses to "Flex Charts :Resizing Bar Chart Columns"

Comment Form

About me

Client-focused software engineer with high intellectual mobility and experience in international teams.

Some of my interests are open innovation, design patterns, networking, personal branding, blogging and study of foreign languages.

Enjoy your visit and don’t hesitate to leave me a feedback!