Commit b939a27a by bergquist

revert f3bc7260o

This change have caused alot of questions. So we revert
parent 70cd9265
...@@ -79,9 +79,9 @@ function ($) { ...@@ -79,9 +79,9 @@ function ($) {
// Stacked series can increase its length on each new stacked serie if null points found, // 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. // to speed the index search we begin always on the last found hoverIndex.
var newhoverIndex = this.findHoverIndexFromDataPoints(pos.x, series, hoverIndex); var newhoverIndex = this.findHoverIndexFromDataPoints(pos.x, series, hoverIndex);
results.push({ value: value, hoverIndex: newhoverIndex, color: series.color, label: series.label }); results.push({ value: value, hoverIndex: newhoverIndex });
} else { } else {
results.push({ value: value, hoverIndex: hoverIndex, color: series.color, label: series.label }); results.push({ value: value, hoverIndex: hoverIndex });
} }
} }
...@@ -126,8 +126,6 @@ function ($) { ...@@ -126,8 +126,6 @@ function ($) {
relativeTime = dashboard.getRelativeTime(seriesHoverInfo.time); relativeTime = dashboard.getRelativeTime(seriesHoverInfo.time);
absoluteTime = dashboard.formatDate(seriesHoverInfo.time); absoluteTime = dashboard.formatDate(seriesHoverInfo.time);
seriesHoverInfo.sort(byToolTipValue);
for (i = 0; i < seriesHoverInfo.length; i++) { for (i = 0; i < seriesHoverInfo.length; i++) {
hoverInfo = seriesHoverInfo[i]; hoverInfo = seriesHoverInfo[i];
...@@ -140,7 +138,7 @@ function ($) { ...@@ -140,7 +138,7 @@ function ($) {
value = series.formatValue(hoverInfo.value); value = series.formatValue(hoverInfo.value);
seriesHtml += '<div class="graph-tooltip-list-item"><div class="graph-tooltip-series-name">'; seriesHtml += '<div class="graph-tooltip-list-item"><div class="graph-tooltip-series-name">';
seriesHtml += '<i class="fa fa-minus" style="color:' + hoverInfo.color +';"></i> ' + hoverInfo.label + ':</div>'; seriesHtml += '<i class="fa fa-minus" style="color:' + series.color +';"></i> ' + series.label + ':</div>';
seriesHtml += '<div class="graph-tooltip-value">' + value + '</div></div>'; seriesHtml += '<div class="graph-tooltip-value">' + value + '</div></div>';
plot.highlight(i, hoverInfo.hoverIndex); plot.highlight(i, hoverInfo.hoverIndex);
} }
...@@ -176,9 +174,5 @@ function ($) { ...@@ -176,9 +174,5 @@ function ($) {
}); });
} }
function byToolTipValue(a, b) {
return parseFloat(b.value) - parseFloat(a.value);
}
return GraphTooltip; return GraphTooltip;
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment