Dynamic Bar Chart

This is a dynamic bar chart written in Flash. Ok, so this may not have an everyday instant usage but you have to admit it is eye catching! :)

Unlike a standard bar chart which displays a series of bars with static values, our example has each bar dynamically cycling its value its maximum value down to a fixed lower value. Each bar chart still has an individual maximum value like its static counterpart.

This example is coded using ActionScript 2.0 and we can achieve the desired effect by modifying the value for each bar with the sinusoidal function as follows:

bar1_mc._height = Math.abs(Math.sin(offset*0.4+0.5))*100+bar1_val;

Animation of the numerical text is done in a similar way. Each bars text y co-ordinate is tied to the bars top y co-ordinate. The idea used in this example can be extended to create some interesting effects. Also, advanced charting in 2D and even 3D can be accomplished by using a bit of polish and creativity!

If you are interested in creating your own custom charts, or have any specific requirements then please contact us for some assistance. We can create charts in other languages of course. This one was done in Flash so it can easily be embedded in a web page blog post.

This entry was posted in Flash, Graphics, Mathematics and tagged , , , , , , , . Bookmark the permalink.

2 Responses to Dynamic Bar Chart

  1. deepika says:

    I need to create a Bar chart in Flash using AS 2.0 and XML. Please guide me.

  2. elmany says:

    Me too. Need the same: create a Bar chart in Flash usign AS 2.0 and XML. Help please

Leave a Reply

Your email address will not be published.