diff --git a/public/app/plugins/panel/graph/graph_tooltip.js b/public/app/plugins/panel/graph/graph_tooltip.js index 39a8b4f443c..b4b23b9f0ff 100644 --- a/public/app/plugins/panel/graph/graph_tooltip.js +++ b/public/app/plugins/panel/graph/graph_tooltip.js @@ -22,10 +22,13 @@ function ($) { var len = series.datapoints.points.length; for (var j = initial; j < len; j += ps) { if (series.datapoints.points[j] > posX) { - return Math.max(j - ps, 0)/ps; + break; } } - return j/ps - 1; + // Special case of a non stepped line, highlight the very last point just before a null point + while(!series.lines.steps && series.datapoints.points[initial] != null && j>0 && series.datapoints.points[j-ps] == null) + j-=ps; + return Math.max(j - ps, 0)/ps; }; this.findHoverIndexFromData = function(posX, series) {