Create an Animated Line Graph in After Effects (2020)

After Effects June 26, 2019 4 min read

In this tutorial, you’ll learn how to make a dynamic line graph in After Effects CC. We’re really excited about this one because it’ll be highlighting our favorite new feature in After Effects 2018 — Create Nulls from Paths

This new feature gives you the ability to control mask and shape points independently from each other with nulls. It’s a total gamechanger, and it’s making animations like this one way easier. Let’s get started!

Note: The steps outlined in this tutorial will only work in After Effects 2018 or newer. 

How to Create a Line Graph in After Effects CC

Step 1: Create Your Composition

Start by making a new composition, and name it “Line Graph.” Make sure it’s HD and then hit OK. The first thing you’ll do is create a new solid to be the background, which you can do by going to Layer > New > Solid. Don’t worry about the color for now, you just want to make sure it’s comp sized. 

Rename it “Background” and hit OK. Then go to Effect > Generate > Gradient Ramp. Inside the Effect Controls, change the colors from black and white to a light color and a darker option of the same color.

Step 2: Draw the Line Graph

Now it’s time for the line graph. Make sure that your background layer isn’t selected, then grab your Pen Tool and loosely draw something resembling a line graph. 

It’s not important that it’s perfect at this stage, simply rename this new layer to be “Line Graph.” Then change the Stroke color and the stroke width so it’s wider and easier to see. Then, turn off the Fill

Step 3: Create a New Null for Every Point on the Shape Path

Once your line graph is drawn, the fun begins. Go to Window > Create Nulls from Paths. This feature is new to 2018, and it’ll bring up a dockable panel. Drag it over into your interface on the side so it’s out of the way.  

Next, you need to twirl down your line graph shape layer until you get to the path and highlight it. With the path highlighted, go to your Create Nulls from Paths panel and select Points Follow Nulls

This creates a new null for every point on your shape’s path — now, when you move those nulls, you’ll see that your path follows. To tidy things up, select all your nulls and go to the Align panel. Make sure it’s set to Selection, and then distribute your nulls evenly in the X dimension. Then, move them so that they are looking nice and centered to your composition.  

Step 4: Add the Points for Each of the Vertices

A huge advantage of having the points following nulls is that you can make other objects follow them too. For this line graph, create some points for each of the vertices that will follow the nulls.

Start by making a new shape layer by going to Layer > New > Shape Layer. Then go to the Add button in the toolbar and choose Ellipse. You’ll also want to use the Add button to make a Fill. By default it goes to red, so change it to what you want. Then, change the name of the shape layer to “Dot 1.” 

Duplicate the dot once for every vertex on the line graph. Since you named the layer “Dot 1,” After Effects will name the duplicates Dot 2, 3, 4, and 5, which is helpful. You can duplicate a layer by hitting Command + D or going to Edit > Duplicate

Now, parent your first dot to your first null, second dot to the second null, and so on. But when you’re parenting hold Shift on the keyboard. By holding shift, not only are you parenting the dot to the null, but you’re also changing the dot’s position to match the null.

Step 5: Animate the Line Graph

Once the whole line graph rig is set up, all that’s left to do is animate it. First, set keyframes on each null’s position. Highlight all of your nulls and pull up their Position with P on the keyboard. 

Set the first keyframe at the beginning of your timeline and make all the Y values 540 so that you have a flat line vertically centered to the comp. For the second keyframe, move the playhead down 20 frames and change the Y values to create something that looks like a line graph. 

Then, move the playhead down 10 frames and add another keyframe with the same value by going to the left of the stopwatch and clicking the empty diamond on each null. Repeat this process once more so that you have two different line graph looks. With your playhead 20 frames further down the timeline, bring all the Y values back to 540. This way, you’ll get a nice little loop. Once you have all your keyframes in, offset each of the nulls by a few frames. 

Step 6: Refine the Animation with Custom Easy Ease Settings

Highlight all the keyframes, right-click on one of them and go to Keyframe Assistant > Easy Ease

While Easy Ease is great, the default settings might not be what you want. To give your animation a little more style, consider adjusting those settings. To do that, ensure that all of your keyframes are still highlighted, right-click on one of the keyframes again, but this time go to Keyframe Velocity. 

A dialog box will pop up. Here, you can change your Influence values for the Incoming and Outgoing Velocity. Set your Incoming Velocity to 80% and Outgoing Velocity to 70%. This will give you a more extreme ease that will look a lot nicer. The little bit of offset and easing is a nice touch to make the animation feel more polished.


That’s all there is to it! We hope you found this tutorial on how to animate a line graph in Adobe After Effects helpful! With the new Create Nulls from Paths feature, you can see how much easier it is to make an animation like this one come to life.

If you’re looking for even more ways to improve your projects, Motion Array has thousands of other After Effects graph templates to check out!