O'Reilly logo

Learning Raphaël JS Vector Graphics by Damian Dawber

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tweets by time

There are approximately 3,000 tweets every second on average, meaning that over the space of 5 minutes there are about one million tweets created. In this section, we will create an interesting animated donut chart visualization that utilizes path arcs to illustrate the time taken for a particular number of tweets to be created:

Tweets by time

Getting started

Our HTML markup defines a canvas into which we will draw four animated arc paths on page load. We will write our JavaScript in tweets-by-time.js:

<h1>Tweets with respect to time</h1> <p>There are approximately 3,000 tweets every ...</p> <div id="tweets-timed"></div> <script type="text/javascript" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required