Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression for dynamic number values (on a bar chart)

  • Expression for dynamic number values (on a bar chart)

    Posted by Barnabas Horvath on March 9, 2019 at 4:52 pm

    Hello!

    I’m trying to create a bar chart with dynamic bars and numbers. I’ve found tutorials for these charts with %s connected to the size of a bar (with slider controls and basic math.round expressions), so that I can do.

    My problem is that I’d like the chart to display dollar values. Is it possible to do that? What I’d like to achieve is that the slider control controls the size of the chart (between a 0-100 scale, that’s perfectly fine), while the same slider controls the the $ values too. (So when the chart is at 100% the number says $1500, but when it’s at 50% it says $750.)

    Is it possible to create a math expression like that for the text layer?

    Avinash Sure replied 7 years, 6 months ago 3 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    March 9, 2019 at 6:17 pm

    Something like this maybe:

    s = thisComp.layer(“control”).effect(“Slider Control”)(“Slider”).value;
    maxVal = 1500;
    “$” + Math.round((s/100)*maxVal)

    Dan

  • Avinash Sure

    March 10, 2019 at 10:07 am

    Hi Dan , I have a similar problem i checked you video on YouTube regarding Animate Data-Driven Graphics in After Effects (https://www.youtube.com/watch?v=JPiyOGyjWvI)

    I have tried to change the expression to my needs i.e i need to create a bar graph similar to this one in the video https://www.youtube.com/watch?v=5yjMSBbcXss. but i have failed miserably

    could you please give me an idea how to proceed with this please. i am trying to create a animated bar graph which shows the military expenditure of countries from 1990 to 2030 , i want the x axis to change based on the value and the position of the rectangle should also change based on its rank.

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy