Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>function redrawplot() { $('.tt1').remove(); var points = plot.getData(); var graphx = $('#placeholder').offset().left; graphx = graphx + 30; // replace with offset of canvas on graph var graphy = $('#placeholder').offset().top; graphy = graphy + 10; // how low you want the label to hang underneath the point for(var k = 0; k &lt; points.length; k++){ for(var m = 1; m &lt; points[k].data.length-1; m++){ if(points[k].data[m][0] != null &amp;&amp; points[k].data[m][1] != null){ if ((points[k].data[m-1][1] &lt; points[k].data[m][1] &amp;&amp; points[k].data[m][1] &gt; points[k].data[m+1][1]) &amp;&amp; (points[k].data[m-1][1] - points[k].data[m][1] &lt; -50 || points[k].data[m][1] - points[k].data[m+1][1] &gt; 50)) { showTooltip1(graphx + points[k].xaxis.p2c(points[k].data[m][0]) - 15, graphy + points[k].yaxis.p2c(points[k].data[m][1]) - 35,points[k].data[m][1], points[k].color); } if ((points[k].data[m-1][1] &gt; points[k].data[m][1] &amp;&amp; points[k].data[m][1] &lt; points[k].data[m+1][1]) &amp;&amp; (points[k].data[m-1][1] - points[k].data[m][1] &gt; 50 || points[k].data[m][1] - points[k].data[m+1][1] &lt; -50)) { showTooltip1(graphx + points[k].xaxis.p2c(points[k].data[m][0]) - 15, graphy + points[k].yaxis.p2c(points[k].data[m][1]) + 2,points[k].data[m][1], points[k].color); } } } } } function showTooltip1(x,y,contents, colour){ $('&lt;div class=tt1 id="value"&gt;' + contents + '&lt;/div&gt;').css( { position: 'absolute', display: 'none', top: y, left: x, 'border-style': 'solid', 'border-width': '2px', 'border-color': colour, 'border-radius': '5px', 'background-color': '#ffffff', color: '#262626', padding: '0px', opacity: '1' }).appendTo("body").fadeIn(200); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload