Commit bcdddfe4 by bergquist

style(tooltip): removed comment and extrated sort

parent c4ca1444
......@@ -126,10 +126,7 @@ function ($) {
relativeTime = dashboard.getRelativeTime(seriesHoverInfo.time);
absoluteTime = dashboard.formatDate(seriesHoverInfo.time);
// Dynamically reorder the hovercard for the current time point.
seriesHoverInfo.sort(function(a, b) {
return parseFloat(b.value) - parseFloat(a.value);
});
seriesHoverInfo.sort(byToolTipValue);
for (i = 0; i < seriesHoverInfo.length; i++) {
hoverInfo = seriesHoverInfo[i];
......@@ -179,5 +176,9 @@ function ($) {
});
}
function byToolTipValue(a, b) {
return parseFloat(b.value) - parseFloat(a.value);
}
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