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

Combining four charts into a dashboard


We created four charts yesterday and now we need to merge these into one page. We create a new file and save it. To combine the four charts into a dashboard, perform the following steps:

  1. We start by adding in all the plugin files we need for all four charts:

    <script src="../js/jqplot.dateAxisRenderer.min.js"></script>
    <script src="../js/jqplot.categoryAxisRenderer.min.js"></script>
    <script src="../js/jqplot.barRenderer.min.js"></script>
    <script src="../js/jqplot.pointLabels.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>
    <script src="../js/themes.js"></script>
  2. Next, we paste in the JavaScript for our line chart from 1168_10_03.html. We start by changing the name of our dataPull function to profitDataPull as follows:

     ...