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

Connecting the cursor with the legend

As we experiment, we come across the option to pass the data points from the cursor tooltip to the legend. We revisit the chart we just worked on, and save it as a new file, 1168_06_05.html:

  1. We include the canvas plugins so that we can rotate our ticks and labels. We need to do this since our legend will be taking up more space than normal:
    <script src="../js/jqplot.cursor.min.js"></script>
    <script src="../js/jqplot.canvasTextRenderer.min.js"></script>
    <script src="../js/jqplot.canvasAxisTickRenderer.min.js"></script>
    <script src="../js/jqplot.canvasAxisLabelRenderer.min.js"></script>
    
  2. We set showTooltip to false so that we don't show data points in multiple places. We set showVerticalLine to true. By connecting ...

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