From b5f237a69b7d49b982fa783200c1caba54765d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 19 Sep 2015 15:20:53 +0200 Subject: [PATCH] fix(graph): minor fix for hover tooltip when combined with a single series using stepped lines, fixes #2754 --- public/app/features/panellinks/module.html | 2 +- public/app/features/templating/partials/editor.html | 2 +- public/app/panels/graph/graph.tooltip.js | 2 +- public/app/partials/panelgeneral.html | 4 ++-- public/test/specs/graph-tooltip-specs.js | 10 ++++++++-- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/public/app/features/panellinks/module.html b/public/app/features/panellinks/module.html index 99f93d21eda..49c6de5dff8 100644 --- a/public/app/features/panellinks/module.html +++ b/public/app/features/panellinks/module.html @@ -56,7 +56,7 @@
-
+
  • diff --git a/public/app/features/templating/partials/editor.html b/public/app/features/templating/partials/editor.html index ad8dca84f49..ca304536849 100644 --- a/public/app/features/templating/partials/editor.html +++ b/public/app/features/templating/partials/editor.html @@ -246,7 +246,7 @@
    Value groups/tags (Experimental feature)
    -
    +
    • Tags query diff --git a/public/app/panels/graph/graph.tooltip.js b/public/app/panels/graph/graph.tooltip.js index 1154f662a7d..8a747b61e0c 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) { + if (series.lines.steps || series.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/app/partials/panelgeneral.html b/public/app/partials/panelgeneral.html index 0d7cbb2c939..09ccbe86dfa 100644 --- a/public/app/partials/panelgeneral.html +++ b/public/app/partials/panelgeneral.html @@ -1,7 +1,7 @@
      General options
      -
      +
      • Title @@ -32,7 +32,7 @@
      Templating options
      -
      +
      • Repeat Panel diff --git a/public/test/specs/graph-tooltip-specs.js b/public/test/specs/graph-tooltip-specs.js index 45d50134a6c..864e87d07f8 100644 --- a/public/test/specs/graph-tooltip-specs.js +++ b/public/test/specs/graph-tooltip-specs.js @@ -41,8 +41,8 @@ define([ describeSharedTooltip("steppedLine false, stack false", function(ctx) { ctx.setup(function() { ctx.data = [ - { data: [[10, 15], [12, 20]], }, - { data: [[10, 2], [12, 3]], } + { data: [[10, 15], [12, 20]], lines: {} }, + { data: [[10, 2], [12, 3]], lines: {} } ]; ctx.pos = { x: 11 }; }); @@ -75,6 +75,7 @@ define([ ctx.data = [ { data: [[10, 15], [12, 20]], + lines: {}, datapoints: { pointsize: 2, points: [[10,15], [12,20]], @@ -83,6 +84,7 @@ define([ }, { data: [[10, 2], [12, 3]], + lines: {}, datapoints: { pointsize: 2, points: [[10, 2], [12, 3]], @@ -104,6 +106,7 @@ define([ ctx.data = [ { data: [[10, 15], [12, 20]], + lines: {}, datapoints: { pointsize: 2, points: [[10, 15], [12, 20]], @@ -112,6 +115,7 @@ define([ }, { data: [[10, 2], [12, 3]], + lines: {}, datapoints: { pointsize: 2, points: [[10, 2], [12, 3]], @@ -134,6 +138,7 @@ define([ ctx.data = [ { data: [[10, 15], [12, 20]], + lines: {}, datapoints: { pointsize: 2, points: [[10, 15], [12, 20]], @@ -142,6 +147,7 @@ define([ }, { data: [[10, 2], [12, 3]], + lines: {}, datapoints: { pointsize: 2, points: [[10, 2], [12, 3]],