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 highlighter plugin

We move on to the highlighter plugin. This plugin works very much like the cursor plugin, but it only highlights the data point that our cursor is hovering over. We will start with the Social Media Shares chart from Chapter 2, More Line Charts, Area Charts, and Scatter Plots, found in 1168_02_01.html, which we created last week. There are a lot of data points to test with:

  1. We start by including the highlighter plugin file with the other included JavaScript files:
    <script src="../js/jqplot.dateAxisRenderer.min.js"></script>
    <script src="../js/jqplot.highlighter.min.js"></script>
    
  2. We will only add the highlighter option to our chart. No other change to the chart is necessary. As with the cursor plugin, we set show to

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