Graph: Fixes stacking issues like floating bars when data is not aligned (#29051)

* Graph: Remove interpolation logic from graph stacking

* Improving tooltip
This commit is contained in:
Torkel Ödegaard
2020-11-13 10:32:08 +01:00
committed by GitHub
parent 01a4951da0
commit dff451992d
2 changed files with 7 additions and 13 deletions

View File

@@ -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