3 Replies Latest reply on Apr 9, 2012 3:34 PM by subtlefly72

Making an interactive bar graph?

Hi tEam,

Ok maybe trying to be too clever here.. Where should I look to find out how to do this.. I want to make an interactive gizmo to explore 20%. so I want a little slider and a red (20%) and a green (80%) bar so that when I slide the slider to different numbers - lets say between 1 and 100 I get a graphical representation of 20% of the number selected as well as the actual numbers?  make sense? so at 50   red column is 10 green is 40. at 100 red is 20 and green is 80?

I could just have a MC with different frames and select a few numbers to highlight and fake it. (which I might end up doing)  but I would like to know how to do this dynamically if you guys can point me in the right direction.

Cheers

sub

• 1. Re: Making an interactive bar graph?

Understanding mathematics, especially basics like percentages, is an integral part of programming.  If 50 is supposed to be 50%, then you change it to a percentage value (0.5) and assign that as the scaleY property of the bars.  If you want to display relative numeric values, then you calculate them and use textfields tot display them.  Whenevr the values change you reassign the new values to the textfields.