Skip to content

Commit 731bb6b

Browse files
committed
Graph: hover tooltip and axis format units fix, bug introduced last week
1 parent fed06ef commit 731bb6b

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/app/panels/graph/graph.tooltip.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ function ($) {
7070

7171
for (i = 0; i < seriesList.length; i++) {
7272
series = seriesList[i];
73-
if (!series.data.length) { continue; }
73+
74+
if (!series.data.length) {
75+
results.push({ hidden: true });
76+
continue;
77+
}
7478

7579
if (scope.panel.stack) {
7680
if (scope.panel.tooltip.value_type === 'individual') {
@@ -99,9 +103,9 @@ function ($) {
99103
lasthoverIndex = hoverIndex;
100104
}
101105

102-
results.push({ value: value, hoverIndex: newhoverIndex, series: series });
106+
results.push({ value: value, hoverIndex: newhoverIndex});
103107
} else {
104-
results.push({ value: value, hoverIndex: hoverIndex, series: series });
108+
results.push({ value: value, hoverIndex: hoverIndex});
105109
}
106110
}
107111

@@ -150,7 +154,12 @@ function ($) {
150154

151155
for (i = 0; i < seriesHoverInfo.length; i++) {
152156
hoverInfo = seriesHoverInfo[i];
153-
series = hoverInfo.series;
157+
158+
if (hoverInfo.hidden) {
159+
continue;
160+
}
161+
162+
series = seriesList[i];
154163
value = series.formatValue(hoverInfo.value);
155164

156165
seriesHtml += '<div class="graph-tooltip-list-item"><div class="graph-tooltip-series-name">';

0 commit comments

Comments
 (0)