Animation

The first question worth asking is: Why would animation improve this project?

If you're making something that isn't really intended to communicate data and is just designed to trip people out at your local warehouse rave, then because it would make it look cool is a totally valid response. Don't let me discourage you from running rainbow color interpolators through your charts if you think it'd be fun (because, speaking from personal experience, creating crazy animated art with D3 is a rather enjoyable use of a Saturday afternoon).

If, however, you're rendering data, a bit more consideration is probably necessary. What is your data doing? If it's a value increasing over time, animating a line going upward from left-to-right makes more sense than fading in the line all at once.

Previously, we set attributes on our various SVG objects as we wanted them to appear once the image was finally rendered. Now, we'll use animation to guide viewers through our graphic, using the narrative focus it provides as a way of helping them interpret the data we're displaying. To do this, we need to animate the relevant properties of each SVG object.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset