AncaA's tech journal

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.

  • Share/Bookmark

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

Comment Form

Arhive

Mobile Barcode

qrcode

This is a 2D-barcode containing the address of my mobile site.If your mobile has a barcode reader, simply snap this bar code with the camera and launch the site.

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!


Software entropy

1. A computer program that is used will be modified.

2. When a program is modified, its complexity will increase, provided that one does not actively work against this.

Switch to our mobile site