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

Using the replot method to change remote datasets


We decide to grab an early lunch. When we get back, we start thinking about some of our other charts we could use the replot method on. Our stock chart that shows the last quarter's prices comes to mind. We contact IT, and they inform us they already have a couple of URLs to get the last 3, 6, 12, or 24 months of data. That's all we need. With the data sets we need, we can begin work:

  1. We pull up the code for the stock chart and save it as a new file. We leave all the plugins from before:

    <script src="../js/jqplot.ohlcRenderer.min.js"></script>
    <script src="../js/jqplot.highlighter.min.js"></script>
    <script src="../js/jqplot.dateAxisRenderer.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. We add dataPull to take the data, and wrap...