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

Adding a threshold to our chart

Sara leans toward the screen, "This is exactly what we need. I'm already thinking that we need to put a line on here, like a threshold. One of our new initiatives is to examine the product categories we are in. If any category drops below monthly revenue of $50,000, it is flagged, and we will evaluate whether we need to stay in that category."

You mention that we can make the change quickly. We won't need to change much in our existing chart:

  1. We start by including the canvasOverlay plugin:
    ...
    <script src="../js/jqplot.canvasOverlay.min.js"></script>
    ...
  2. We create a canvasOverlay option and set show to true. Next, we create the objects option, which accepts an array of objects with the options for each line we want ...

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