O'Reilly logo

jQuery for Designers : Beginner's Guide - Second Edition by Natalie MacLees

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

Time for action – creating a pie chart

We'll keep working with the files we set up in the previous section. Perform the following steps to create a pie chart with the Visualize plugin:

  1. Inside the HTML file, add a second HTML table that contains some data, as shown in the following code:
    <table id="eaten"> <caption>Who had what?</caption> <thead> <tr> <td>&nbsp;</td> <th scope="col">Scones</th> <th scope="col">Tea Sandwiches</th> <th scope="col">Pastries</th> <th scope="col">Tea</th> </tr> </thead> <tbody> <tr> <th scope="row">Alice</th> <td>1</td> <td>3</td> <td>1</td> <td>2</td> </tr> <tr> <th scope="row">Mad Hatter</th> <td>0</td> <td>6</td> <td>3</td> <td>1</td> </tr> <tr> <th scope="row">Dormouse</th> <td>1</td> <td>6</td> <td>0</td> <td>3</td> ...

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