diff --git a/public/app/panels/graph/graph.tooltip.js b/public/app/panels/graph/graph.tooltip.js index 9f9b5959331..596f488b98e 100644 --- a/public/app/panels/graph/graph.tooltip.js +++ b/public/app/panels/graph/graph.tooltip.js @@ -69,7 +69,7 @@ function ($) { } // Highlighting multiple Points depending on the plot type - if (scope.panel.steppedLine || (scope.panel.stack && scope.panel.nullPointMode == "null")) { + if (scope.panel.steppedLine || scope.panel.stack) { // stacked and steppedLine plots can have series with different length. // Stacked series can increase its length on each new stacked serie if null points found, // to speed the index search we begin always on the last found hoverIndex. diff --git a/public/test/specs/graph-tooltip-specs.js b/public/test/specs/graph-tooltip-specs.js index f58759517da..e883741cefc 100644 --- a/public/test/specs/graph-tooltip-specs.js +++ b/public/test/specs/graph-tooltip-specs.js @@ -73,8 +73,22 @@ define([ describeSharedTooltip("steppedLine false, stack true, individual false", function(ctx) { ctx.setup(function() { ctx.data = [ - { data: [[10, 15], [12, 20]], stack: true }, - { data: [[10, 2], [12, 3]], stack: true } + { + data: [[10, 15], [12, 20]], + datapoints: { + pointsize: 2, + points: [[10,15], [12,20]], + }, + stack: true, + }, + { + data: [[10, 2], [12, 3]], + datapoints: { + pointsize: 2, + points: [[10, 2], [12, 3]], + }, + stack: true + } ]; ctx.scope.panel.stack = true; ctx.pos = { x: 11 }; @@ -83,14 +97,27 @@ define([ it('should show stacked value', function() { expect(ctx.results[1].value).to.be(17); }); - }); describeSharedTooltip("steppedLine false, stack true, individual false, series stack false", function(ctx) { ctx.setup(function() { ctx.data = [ - { data: [[10, 15], [12, 20]], stack: true }, - { data: [[10, 2], [12, 3]], stack: false } + { + data: [[10, 15], [12, 20]], + datapoints: { + pointsize: 2, + points: [[10, 15], [12, 20]], + }, + stack: true + }, + { + data: [[10, 2], [12, 3]], + datapoints: { + pointsize: 2, + points: [[10, 2], [12, 3]], + }, + stack: false + } ]; ctx.scope.panel.stack = true; ctx.pos = { x: 11 }; @@ -105,8 +132,22 @@ define([ describeSharedTooltip("steppedLine false, stack true, individual true", function(ctx) { ctx.setup(function() { ctx.data = [ - { data: [[10, 15], [12, 20]], }, - { data: [[10, 2], [12, 3]], } + { + data: [[10, 15], [12, 20]], + datapoints: { + pointsize: 2, + points: [[10, 15], [12, 20]], + }, + stack: true + }, + { + data: [[10, 2], [12, 3]], + datapoints: { + pointsize: 2, + points: [[10, 2], [12, 3]], + }, + stack: false + } ]; ctx.scope.panel.stack = true; ctx.scope.panel.tooltip.value_type = 'individual';