Book Image

Learning jqPlot

By : Scott Gottreu
Book Image

Learning jqPlot

By: Scott Gottreu

Overview of this book

Table of Contents (19 chapters)
Learning jqPlot
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Building a bubble chart


We finish our planning and decide to grab lunch since we're still waiting on data from Sara. When we return to the office, we have an e-mail waiting for us from Sara with the manufacturer revenue numbers she promised us this morning:

  1. We begin coding our chart by including the bubbleRenderer plugin file along with the highlighter and canvas plugin files:

    <script src="../js/jqplot.bubbleRenderer.min.js"></script>
    <script src="../js/jqplot.highlighter.min.js"></script>
    <script src="../js/jqplot.canvasTextRenderer.min.js"></script>
    <script src="../js/jqplot.canvasAxisTickRenderer.min.js"></script>
    <script src="../js/functions.js"></script>
  2. Next, we create our data array. We place the total revenue in the first element for each data array followed by the units sold. Based on the numbers Sara sent us, we calculate the percentage of profit for each manufacturer and make this the third element. For the fourth element...