I am trying to create a bar chart using random variables. My challenge is that the variables are random (not multiples of 5, 10, 20 or 25).
One solution is to divide the entire bar into 100 instances of different sizes. Using a variable, do the calculation and show the relevant size. Is there a more effective solution to my problem?
You could try using looped motion path animations that move bars inside a scrolling panel which effectively masks the bars so they seems to "grow" or "shrink". Or, if your slidebackground lends itself to that, you could try using a bitmap with cutouts and then have sliders underneath, where the slider thumbs act as the bars. Here is an example of the old-fashioned, state based option.
Of course, there is always the option to use some Javascript-based charting solution.
In this example, the bar length (increase or decrease) is known (+10 or -10). In my case, it's all random. The variable can increase by 2 or decrease by -3.
I used the slider solution (suggested by Russell) and it worked perfectly.
As you mentioned - You could use the same approach and create a chart based on random numbers, rather than manually selecting values - In that case, how many bar states do I need to create? Just wanted to learn something new.
I placed a rectangle on the stage and changed it to green. Then I right clicked on the rectangle and chose Save As Picture. Then for the thumb fill, I chose that picture.
12 Replies
You could try using looped motion path animations that move bars inside a scrolling panel which effectively masks the bars so they seems to "grow" or "shrink". Or, if your slidebackground lends itself to that, you could try using a bitmap with cutouts and then have sliders underneath, where the slider thumbs act as the bars. Here is an example of the old-fashioned, state based option.
Of course, there is always the option to use some Javascript-based charting solution.
Thanks, Michael for sharing this example.
In this example, the bar length (increase or decrease) is known (+10 or -10). In my case, it's all random. The variable can increase by 2 or decrease by -3.
Hello Ansh,
I was thinking that you could use a slider for this. I changed the thumb to a picture of a green rectangle.
You could use the same approach and create a chart based on random numbers, rather than manually selecting values.
Yes, that's a slight variation on the masking technique I had mentioned.
WoW. Thanks, Russell for creating a quick demo and the solution. It really worked.
Thanks, Michael.
I used the slider solution (suggested by Russell) and it worked perfectly.
As you mentioned - You could use the same approach and create a chart based on random numbers, rather than manually selecting values - In that case, how many bar states do I need to create? Just wanted to learn something new.
Whatever your range is for the random number(s). For example, for a random number between 1-50, you need 50 states per bar object.
oh..that's a lot. I better stick with the slider option.
Thanks.
Hey Russell,
Sorry to trouble you but how can I change the colour of this slider. I tried using the shape fill but then the slider snaps to a small icon.
It seems I need some guidance to manage (change attributes) the thumb style you used here.
Thanks in advance.
I placed a rectangle on the stage and changed it to green. Then I right clicked on the rectangle and chose Save As Picture. Then for the thumb fill, I chose that picture.
That's so cool. Thanks, Russell.
This discussion is closed. You can start a new discussion or contact Articulate Support.