Kaynağa Gözat

fix(graph): minor fix for hover tooltip when combined with a single series using stepped lines, fixes #2754

Torkel Ödegaard 10 yıl önce
ebeveyn
işleme
b5f237a69b

+ 1 - 1
public/app/features/panellinks/module.html

@@ -56,7 +56,7 @@
 				</ul>
 				<div class="clearfix"></div>
 			</div>
-			<div class="tight-form">
+			<div class="tight-form last">
 				<ul class="tight-form-list">
 					<li class="tight-form-item" style="width: 20px">
 						<i class="fa fa-fw fa-unlink invisible"></i>

+ 1 - 1
public/app/features/templating/partials/editor.html

@@ -246,7 +246,7 @@
 			<div class="editor-row" ng-if="current.type === 'query'">
 				<div class="tight-form-section">
 					<h5>Value groups/tags (Experimental feature)</h5>
-					<div class="tight-form" ng-if="current.useTags">
+					<div class="tight-form last" ng-if="current.useTags">
 						<ul class="tight-form-list">
 							<li class="tight-form-item" style="width: 135px">
 								Tags query

+ 1 - 1
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.

+ 2 - 2
public/app/partials/panelgeneral.html

@@ -1,7 +1,7 @@
 <div class="editor-row">
   <div class="section">
     <h5>General options</h5>
-		<div class="tight-form">
+		<div class="tight-form last">
 			<ul class="tight-form-list">
 				<li class="tight-form-item">
 					Title
@@ -32,7 +32,7 @@
 	</div>
 	<div class="section">
 		<h5>Templating options</h5>
-		<div class="tight-form">
+		<div class="tight-form last">
 			<ul class="tight-form-list">
 				<li class="tight-form-item">
 					Repeat Panel

+ 8 - 2
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]],