Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Animated bar graph, starting with lowest value, then larger values, but overall width is always same

Contributor ,
Jan 21, 2021 Jan 21, 2021

I need animation that adds new longer lines to a bar chart, the overall width staying the same, so the increasingly longer bars should cause previous smaller values to shrink as the new longer bars add and grow. I hope the below illustration helps show what I have in mind. Maybe a plugin can do this?

 

BarChartIllustration.jpg

TOPICS
How to , Resources
668
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jan 25, 2021 Jan 25, 2021

You don't need a plug-in to do this, you can do everything with native After Effects tools. The short answer is that you can draw these bars with shape layers and animate just the X-Value of the Rectangle's Scale parameter. You don't want to use the layer's Size parameter, as this will distort the layer, but if you unlink the Scale values, then you can keep the Y-Value the same (the width of the bar) and only increase the length.

 

Are you looking to connect this bar graph to real data that you have in a .csv or .json file? If so, you can do this relatively easily.

 

Here's some info on data-driven animation in AE:
https://helpx.adobe.com/sk/after-effects/user-guide.html/sk/after-effects/using/data-driven-animatio...

https://www.premiumbeat.com/blog/create-data-driven-animations-in-after-effects/ 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 25, 2021 Jan 25, 2021

Easy enough to set up using a bunchg of simple expressions in volving the linear() interpolator to keep things scaling realtive to one another. I would suggest you start by actualyl reading the online help on expressions and all that.

 

Mylenium

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 25, 2021 Jan 25, 2021
LATEST
I thought about animating the scale of shapes. What I thought was tricky was that when the third bar got to 100% width, bars 1 and 2 needed to shrink down together. Maybe it was just math to figure out how they all individually needed to shrink, but what I could wrap my head around was shrinking then as a group.
 
As Lutz suggests, I suppose I could have done with Expressions, but I don't know how to make them, even by acutally reading the online help.
 
I had the thought I could achieve it with precomps. That wasn't attractive to me because I would have to do key frames inside and outside comps and it would be harder to keep track of. But the idea got me thinking maybe I could do the same thing in Motion, since it’s grouping feature acts similar to precomping, but without diving into separate timelines.
 
Once I figured it out it didn’t take long to keyframe the Scale X value of the layers and groups. 
 
Here is the result:
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines