Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE AFTER EFFECTS:HomeForumBasicsExpressionsTutorialsPodcastsAE TechniquesTrainingCreative Cloud DebateFAQ

Re: Animating percentage bars in a chart

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Share on Facebook
Respond to this post   •   Return to posts index   •   Read entire thread


Dan EbbertsRe: Animating percentage bars in a chart
by on Jul 13, 2012 at 6:13:56 pm

I would set the anchor point of the bars to the right edge and add a Slider Control to each bar layer. Then I'd use a scale expression like this:

w = effect("Slider Control")("Slider");
[w,100]

For the corresponding text layer, I'd use a position expression like this (assumes the layer is positioned properly in y):

margin = 10;
L = thisComp.layer("bar 1");
x = L.transform.position[0] - L.width*L.transform.scale[0]/100;
[x+margin,value[1]]

And a Source Text expression like this:

s = thisComp.layer("bar 1").effect("Slider Control")("Slider");
Math.round(s) + "%"


Dan



Posts IndexRead Thread
Reply   Like  
Share on Facebook


Current Message Thread:




LOGIN TO REPLY



FORUMSTUTORIALSMAGAZINESTOCKYARDVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2013 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]