Do it with data.
By: Chris Hardcastle
Tags: Animation, Spreadsheets, Design, Motion Design, Data Visualization

The humble pie chart.

So let’s say that you’ve been tasked with producing a (suppress yawn) pie chart. If you want to do that in Excel, no problem. Insert > Chart = Done. But if you want to animate it then things become a lot less… simple. If you‘re asked to update that chart at a later date, the following hours/days are likely to be interspersed with bouts of you repeatedly slamming your head into your desk.

But it doesn’t have to be like that.

Take this typical data set you might receive from a client.

Equities — 53%

Bonds — 8%

Mutual Funds — 2%

Cash & MM Instruments — 9%

Other — 28%

Your job is to present this rather bland information in an engaging and digestible way. So off you go with this data and carefully construct a pie chart in your favourite animation program. You add your keyframes to each slice and lovingly adjust the easing. Maybe you get fancy and spend some time setting up a rig to run it all off one attribute. It truly is a thing of beauty. The most magnificent circle. People weep when they see it.

But then…

… it’s 3 months later and the client wants to change something. In fact, They want to change all the things. Their landscape has shifted and it needs updating fast for a meeting tomorrow.

Breathe…

We’ve had .csv support in Cavalry for a good while now but the recent addition of native Google Sheets support has removed a lot of the friction for a user in handling that data. It means that any changes made to that data are instantly reflected in your composition.

In the example below the proportion of each slice of the pie is being set directly by the data in this Google Sheet.

Because Cavalry has a Duplicator (see Ian Waters post here) all the animation is handled without expressions and with only a few keyframes meaning any updates to timing are easy to make. But we’re not here to talk about all that.

A simple, data driven pie chart animation.

What we’re interested in here is the data aspect. You’ll notice that the data in that Google Sheet also includes information for the Labels and Colours. They are also being used to drive both of those elements. In the interests of clarity we’re not going to change those in this example but by simply changing the values in the Percentage column of the Google Sheet and refreshing the asset in Cavalry we get a new pie chart.

Some quick edits in Google Sheets.

Here’s that same chart updated with the data changes:

Updated animation based on new data.

All we had to do there was update the spreadsheet, refresh the link in Cavalry and hit render (although even that may not be necessary in the future — more on that another time). This technique can be applied to any attribute in Cavalry. If we change the labels in the Google Sheet the labels change in the animation. If we change the colours in the Google Sheet… you get the idea.

All we had to do there was update the spreadsheet, refresh the link in Cavalry and hit render.

So not only have we saved a lot of time and energy here but by referencing the data externally all the animation is independent of the content.

That means cost savings for your clients and that you can get on with focussing on the creative.

That gives you (and your client) confidence that there will be no accidental timing changes and that nothing but the data itself has changed. Setting up templates like this for bigger corporate clients could drastically reduce the amount of time spent doing what is generally considered to be on the tedious end of the spectrum for a designer.

That means cost savings for your clients and that you can get on with focussing on the creative.