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

Zooming in on a colored candlestick chart

We get back from lunch and jump into creating the colored candlestick chart for Calvin. It will only require a couple of changes to our previous chart. We save the original as a new file, and then begin our modifications executing the following steps:

  1. We include the cursor plugin file because the zooming feature is part of the cursor plugin:
    <script src="../js/jqplot.cursor.min.js"></script>
    <script>
    $(document).ready(function(){
      function dataPull(remoteData,options) {
        return [remoteData];
      }
  2. We add the enablePlugins option before we create our chart. This way we don't have to enable each plugin individually. Next, we change the remote data feed back to the JSON feed with the first three quarters of data, ...

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