diff --git a/public/app/plugins/panel/graph/graph_tooltip.ts b/public/app/plugins/panel/graph/graph_tooltip.ts index 805cf12d0cb..17c52c180d2 100644 --- a/public/app/plugins/panel/graph/graph_tooltip.ts +++ b/public/app/plugins/panel/graph/graph_tooltip.ts @@ -102,17 +102,11 @@ export default function GraphTooltip(this: any, elem: any, dashboard: any, scope minTime = pointTime; } - if (series.stack) { - if (panel.tooltip.value_type === 'individual') { - value = series.data[hoverIndex][1]; - } else if (!series.stack) { - value = series.data[hoverIndex][1]; - } else { - lastValue += series.data[hoverIndex][1]; - value = lastValue; - } - } else { - value = series.data[hoverIndex][1]; + value = series.data[hoverIndex][1]; + + if (series.stack && value !== null && panel.tooltip.value_type !== 'individual') { + lastValue += value; + value = lastValue; } // Highlighting multiple Points depending on the plot type diff --git a/public/vendor/flot/jquery.flot.stack.js b/public/vendor/flot/jquery.flot.stack.js index 267d4e51642..36ec248d632 100644 --- a/public/vendor/flot/jquery.flot.stack.js +++ b/public/vendor/flot/jquery.flot.stack.js @@ -134,7 +134,7 @@ charts or filled areas). // we got past point below, might need to // insert interpolated extra point if (i > 0 && points[i - ps] != null) { - intery = py + (points[i - ps + accumulateOffset] - py) * (qx - px) / (points[i - ps + keyOffset] - px); + intery = 0; newpoints.push(qx); newpoints.push(intery + qy); for (m = 2; m < ps; ++m) @@ -151,7 +151,7 @@ charts or filled areas). // we might be able to interpolate a point below, // this can give us a better y if (j > 0 && otherpoints[j - otherps] != null) - bottom = qy + (otherpoints[j - otherps + accumulateOffset] - qy) * (px - qx) / (otherpoints[j - otherps + keyOffset] - qx); + bottom = 0; newpoints[l + accumulateOffset] += bottom;