ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Responsive Data Visualization Charts

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dustin Novacek
Responsive Data Visualization Charts
on Feb 16, 2020 at 11:34:05 pm

Hi everyone. I am curious in learning how to build a responsive charts/graphs rig. Lets say I have to make a bar chart and the dataset that I have has 10 values. What if I want to use this same chart for a new dataset and that new dataset has only 6 values. Can I use expressions so that the chart will update accordingly based on the dataset I supply it? It would become very tedious having to manually delete those 4 unused bars and then reposition/rescale the 6 remaining and active bars. I hope my question makes sense. Your feedback is greatly appreciated.

Return to posts index

Brian Holzknecht
Re: Responsive Data Visualization Charts
on Feb 17, 2020 at 9:11:05 pm

Hey Dustin,

Not exactly sure what your question is, but I've made a basic bar graph rig using expressions. I'm not very good with math or programming, so it may not be as efficient as it could be, but I'll share it with you, and maybe it can help you build your own. In my project there are a few layers that control everything. On the layer named "Layout controls" #36 there is a slider control effect that controls the number of bars. If you change that from 7 to 4, for example it will only show the first 4 bars while hiding the other 6 in the comp. you can resize and reposition the whole chart area using the 2 nulls at the top "BL" & "TR". All animations are controlled via the "Animation Controls" layer. Check out all the control layers at bottom and you'll see there are a lot of options you have control of. Hopefully it all helps.

I tried to upload the project to Creative cow, but kept getting errors, so hopefully my link to my dropbox will work.


Return to posts index

Joe Richardson
Re: Responsive Data Visualization Charts
on Feb 21, 2020 at 12:50:23 am

I've been working on a project that I think is similar to what you're doing. Youre saying that you want to evaluate a set of data that might change, but the evaluation and animation wont?

my setup is using different folders, and pointing AE to it using a "Master Path" composition. So like i have 60 folders each with hundreds of data files named the same thing. So all AE has to do is 'look' at different folders, and it'll evaluate the js data to drive animations.

the way i set it up was i made a master-path composition with a text layer so like D:\Test\ is what the text layer says (make sure that last \ is there). Then all of the other compositions have a text layer referencing the masterpath comp, a text layer with text pointing to the particular individual data you want to point to in the folder. Ex: Camera_X_Position or Humidiy. and finally, a text layer that is called "Humidity Value" that displays the information. In the SourceText of the value layer, i have an expression thats like:

pathstring = comp("PathString").layer("MainPathString")("Text")("Source Text") // this would refer to the D:\Test\ path
dataPointer = thisComp.layer("dataPointer").text.sourceText; // this would be "Humidity" or something
ext = ".js"; // in my case, my data files have the extension .js.
assemble = pathstring + dataPointer + ext; // this combines the path, the pointer and the extension
$.evalFile(assemble); // this makes AE evaluate the whole thing.

From there, you have to do more stuff to get AE to show you the values-on-the-current-frame

Return to posts index

Tomas Bumbulevičius
Re: Responsive Data Visualization Charts
on Feb 21, 2020 at 9:20:45 am

Hey Dustin, there is definitely more than a single way to do anything like this! However, below questions will narrow down the topic:

1. Is maximum amount of data points limited to a certain number, or could be more than 10 entries?
2. Is example relevant only to bar charts or any other too? As for bars, their distances in between heights or widths matter, but for other types - its a different story.
3. How do you plan to 'handle' data file to AE?

Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 All Rights Reserved