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
:
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>
We set
showTooltip
tofalse
so that we don't show data points in multiple places. We setshowVerticalLine
totrue
. By connecting the cursor to the legend, values will only appear when the cursor crosses data points. When our vertical line crosses a data point, the values will appear in the legend. So,showVerticalLine
must be...