The delta value in the chart pane sometimes doens't show '+' for a positive delta
[WebKit-https.git] / Websites / perf.webkit.org / public / v2 / app.js
index 3dc452f00d9ba3c2df872906d37d8c02b6f31d3f..9f0ea8c821ba99afa389a2c07474bd0c7e0de4a3 100755 (executable)
@@ -406,9 +406,6 @@ App.Pane = Ember.Object.extend({
             label = formatter(Math.abs(diffFromTarget)) + ' until target';
 
         var valueDelta = previousPoint ? chartData.deltaFormatter(currentPoint.value - previousPoint.value) : null;
-        if (valueDelta && valueDelta > 0)
-            valueDelta = '+' + valueDelta;
-
         return {className: className, label: label, currentValue: chartData.formatter(currentPoint.value), valueDelta: valueDelta};
     },
     _relativeDifferentToLaterPointInTimeSeries: function (currentPoint, timeSeries)
@@ -445,7 +442,7 @@ App.createChartData = function (data)
         target: runs.target ? runs.target.timeSeriesByCommitTime() : null,
         unit: data.unit,
         formatter: data.useSI ? d3.format('.4s') : d3.format('.4g'),
-        deltaFormatter: data.useSI ? d3.format('.2s') : d3.format('.2g'),
+        deltaFormatter: data.useSI ? d3.format('+.2s') : d3.format('+.2g'),
         smallerIsBetter: data.smallerIsBetter,
     };
 }