This lesson is exclusive to members

After Effects - Animated Infographic Video & Data Visualisation

How to use Adobe Illustrator to create an moving bar graph in After Effects

Daniel Walter Scott

Download Exercise Files Download Completed Files

Contents

Certificates

We’re awarding certificates for this course!

Check out the How to earn your certificate video for instructions on how to earn yours and click the available certificate levels below for more information.

You need to be a member to view comments.

Join today. Cancel any time.

Sign Up

Hi there, in this tutorial we're going to use Illustrator's graphing tool to build our Excel spreadsheet out, in here, style it, then switch it out to After Effects, and animate it. I find this is the easiest way to get data, any sort of data into After Effects and animate it. Let's go and learn how to do that now.

So the first thing we need to do is make a new document in Adobe Illustrator. So go to 'File', 'New'. We'll use the little button there. We can use 'Film & Video', and pick 'HDTV'. That's the one we want, '920x1080'. Reason I don't like to use these in the templates is because you get all of the Bars in a transparent background, and all these title safe. We don't need any of this, and it's a pain to go turn it off. So what I just do, is I fake it by going to 'New', pick 'Web', because it’s going to set it to pixels. And then we do the exact same measurements. So we go to '920x1080'. And make sure it's set to 'RGB'. And click 'Create'. You end up in the same position, it's the same size but it's got a nice white background without all the guides everywhere. We're going to save this one. We're going to save it to our AFX files. And we'll call this one our 'Coffee Bar Chart'.

We're going to use Illustrator's graphing tool. It's kind of down here. Hold it down, there's a bunch of different options you can choose from. Doesn't matter which one. Technically a Bar Graph goes left to right, we're going to use Column Graph. And draw it out to the rough sort of size you want it to appear in After Effects. Because we've made the size same as After Effects, you can kind of work proportionately. What happens is it opens up this little mini Excel spreadsheet. We can manually type things in here. What I'm going to do is go through from Excel, grab all these parts, copy it, back into Illustrator. Click in this first field here, and just hit 'Paste'. Then click this little tick. And it's going to go and create all the graphs for us. I love doing it this way. It even puts the measurements along the top here, and calculate all the sizes.

Now at the moment this Bar Graph is actually tied to this Excel sheet. Even if you close it down, it's actually kind of still connected to it. So, you've got it here, and say you want to make an update, you have the object selected, 'Object', go to 'Graph', 'Data'. And you can see in here, I can go and make changes, I can make this '100'. 'Update' it, and it updates the graph. I'm going to undo that. Close this down. The problem now is that After Effects needs to smash this into lots of pieces. At the moment it's this editable graph. What we need to do is kind of pick it apart. And to do that—

You might want to save a version of this so it's nice, and still a graph, and editable, but what we're going to do is have it selected with my Black arrow, go up to 'Object', 'Ungroup'. It's going to warn you, saying it's not going to be a graph anymore, we can't edit it. You got to click 'Yes'. And now it's going to smash to pieces. It's under 'Object'. If you go to 'Graph' now, and click on 'Data', it doesn't know what you're talking about. So we need to do that, and it's ungrouped it into little pieces. And while we're here, we are going to Style it. I'm just going to go through and pick some colors. So this stuff here, I'm going to go pick a new Fill color. Unfortunately, if I go into here, I don't have the Swatches. For some reason at the moment, the Library Swatches and the Swatches built into Illustrator aren't particularly great connecting to each other. So what we're going to do is, it's easier to just go over here right click it, and say, 'Add to Swatches'. I'm going to add both sets to Swatches. Then, on the top here give it a second, here they are there. We got one line dark version.

I'm going to pick that for the Fill. The text here, I'm going to select both of these and we're going to adjust the Type before we leave. It's best doing it in here, rather than in After Effects. Selecting on you, grab my Type tool window. 'Type', and go to 'Character'. And in here, I'm going to go through, and you can make adjustments. I'm picking 'Roboto Slab'. Yours is probably going to start off with a different font. Can't remember what it is off the top of my head. So I've made these adjustments, it's going to work for me. Actually I need this to be that off-white color because I am putting it on to

One last thing I'm going to do is, I'm going to get rid of this. So these guys are all stuck together. Instead of ungrouping them - you can do that - is grab the White arrow and select it around this stuff. Delete it, back to the Black arrow. So we've got kind of the basics. Now we need to make this ready for After Effects. And the main thing we need to do is, under Layers panel. Every bit we want to update differently needs to be on its own Layer. So I'm on my Layers panel here. If you can't find it, go to 'Window', 'Layers'. And we want one for all the background stuff. 2, 3, 4, 5, 6, so 6 in total. Here we go. And what we're going to do is twirl down 'Layer 1'. Actually I'm going to tear this off, make it nice and big. So I can see the whole thing. And all of these guys are on their own, they're all this one chunk, so I'm going to twirl this down. Inside of here, inside of this group. Here we go. So that's my—

I'm going to turn the Eyeball off, that's the first one. So that's my-- actually this is my last one, this is my first one. So I want you to go up to 'Layer 2'. Renaming these guys, double click it. It's going to be called 'Bar 1'. This is going to be 'Bar 5'. I don't know why I want to start at the top. 'Bar 4', 'Bar 3'. I'm naming them just to impress you, I never name them. And you are going to go onto this one, and this one, and this one, and this one. So 'Layer 1' now is going to be, I'll call it the 'Axis'. So all of you on one layer, all of you guys on separate layers.

The one thing I don't like is, all these guys have a stroke around the outside. Selecting them all, the Stroke at the top here, I'm going to set to '0'. Goodbye Stroke. Awesome. Hitting 'Save'. And that's how you get data ready in Illustrator. Basically you do your Styling in here. And you just separate the bits you want to animate separately on to different layers. You could just get all of these guys to animate the same. So you only need two Layers, the Axis, and all the charts together, but we can't animate them separately. Let's jump into After Effects, so here in After Effects I've still got that project we were working on before. when we did our Manual Bars, it doesn't really matter. Grab a new project. So what we're going to do is we're going to 'File', 'Import'. We're going to just skimp up, click the gray area. And we're going to bring in the file we were just working on in Illustrator. It's called 'Coffee Bar Chart', I'm going to click 'Open'. And because we're using Layers—

We've been importing lots of Illustrator files before and we haven't got this little window. This appears only because we've got Layers set up. If you don't want to separate them into Layers, like we want to do, you can just switch it to 'Footage'. And it would just merge the Layers, that's great. What we want to use is this special feature called 'Composition'. So it's going to make a Comp for us, we don't have to make it. And the cool thing about it is it's closed out Illustrator files the right size. It's going to be the right dimensions. And also, down here where it says Footage Dimensions, we want to make sure it's set to 'Layer Size'. Otherwise it's pretty hard to animate. Let's click 'OK'. So it's created a Comp, and these are all the Layers that have come through. Remember, Axis Bar 1, 2, 3, 4, 5. Let's open up this Comp that it's made, double click it. It's gray, except the background is black.

So what we're going to do is go to 'Layer', 'New', 'Solid'. I'm going to pick a color of white. Just a little bit of off-white. And everything else is perfect. Click 'OK'. I'm going to name it 'Background'. Let's stick it at the back, and lock it. So there's my stuff in from Illustrator. What I'd like to do now is animate it, and we're kind of at that exact same point we were before. Remember, on this guy when we started. So we've drawn the Bar. What we want to do now is start animating it. The first thing we need to do is adjust the Anchor Point. So it needs to be in the center. So we're going to hold down 'Command' on a Mac, or 'Control' on a PC. We'll do it for all these guys while we're here. And we're going to start animating it.

So we're up to where we were before, we're going to do some animating. If you feel like skipping ahead, don't, there's one last little thing I want to show you once we've got it animated. I might do the first one together then we'll zoom through, and then we'll jump to that cool bit where we stagger them all. So 'Bar 1' selected, 'Scale', 'Timeline' at the beginning. I'm going to start the stopwatch. I'm going to break the link between the two, set the first one to '0'. Then after about 7 frames, I'm going to get it up to 100. I am then going to click 'Option' on my Mac, or click 'Alt' on a PC, this stop watch. And we're going to use that-- here you are. My expression for overshoot. Totally overusing this. And what I'll do is I'll set the Motion Blur for them all. And what I want to do is copy this. Get my Playhead back to the beginning, click on 'Bar 2', hit 'Paste'. And now we've got both of them going.

You can see, it's kind of equipped now. 'Paste', 'Paste', 'Paste'. And if I hit 'S', you'll see the Keyframes will come along, along with the Expression. So do the first one, get it looking how you want, and then they all come along. Now I want to stagger them, so I'm going to close all of these. And I just click 'U' there. 'U' opens and closes, like a little toggle switch. Now, you can just go through now, and say actually I want you to be this, and this, and that's fine. But say you want to be perfect, and you got lots to do, so we're going to use this little trick, called Sequence Layers. Select 'Bar 1', hold all of them to 'Bar 5'. Make sure your Playhead's at the beginning. Go to 'Animation', let's go to 'Keyframe Assistant'. There's one called 'Sequence Layers', it's just going to stagger them for us.

Now, if you don't click 'Overlap' they're going to sequence in one after each other. The problem is, see how long they are. They're actually 5 seconds long each, that solid bar. So actually, instead of coming in after each other-- well they work, let's click 'OK', but this Timeline, let's zoom out. So this one goes for this and this one doesn't start till right at the end of my animation. That's not what I want to do. I want to go to 'Animation', 'Keyframe Assistant', 'Sequence Layers'. So you want a bit of an overlap. This could be a little bit confusing. How much of an overlap? Mine needs to be about 4. It's coming up backwards overlap. How far? That was 0, so I want to come back this way. How far do I want to come back this way? I want to come back about 4 seconds, 20 frames. That gets it kind of really close to the end here. So we're kind of almost 5 seconds with overlap back on top of each other. You're going to have to mess around with this, I do it every single time. Let's click 'OK', and we've got a nice stagger going.

That's how to move from Illustrator into After Effects. So that's kind of like our option 2. Let's look at option 3 now where we use Excel to build a graph and we deconstruct it and use it in After Effects. All right, let's go and do that now.