Adobe After Effects Expressions Forum
Animating Bar Charts
Animating Bar Charts
by Ed Hecht on Feb 3, 2012 at 8:17:00 pm

I'm using horizontal vector bars (extruded and beveled in Illustrator), x-scaled over time to show their growth. I have a small text box that goes from 0-X% over that same time (using a nice expression I found here). To make the text box follow the end of the bar as it grows, I am parenting the text layer to the bar. Problem is, the text box also x-scales. Is there a way to do this with expressions to avoid the scaling (or even a Null object)? Thanks in advance!
Ed




Re: Animating Bar Charts
by Paul Roper on Feb 3, 2012 at 8:23:49 pm

You could un-parent the text box from the bar, but link its position to the scale of the bar like this (adjust the *3 to alter the distance the text box travels to match the bar's scale). Paste this expression into the position of the text box:

amount=thisComp.layer("bar").transform.scale[0];
[value[0]+amount*3,value[1]]



Re: Animating Bar Charts
by Ed Hecht on Feb 3, 2012 at 10:31:58 pm

Yahoo! Thanks so much, Paul. that did the trick!







© CreativeCOW.net