O'Reilly logo

Learning jqPlot by Scott Gottreu

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

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> ...

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