Merge pull request #2502 from MilosKozak/dev

do not count == 0
This commit is contained in:
Milos Kozak
2017-03-10 11:06:53 +01:00
committed by GitHub
+2 -2
View File
@@ -176,8 +176,8 @@ hourlystats.report = function report_hourlystats(datastorage, sorteddaystoshow,
var net = positive + negative;
totalPositive[h] += positive;
totalNegative[h] += negative;
if (Math.abs(positive) > Math.abs(negative)) positivesCount[h] += 1;
else negativesCount[h] += 1;
if (positive + negative > 0) positivesCount[h] += 1;
else if (positive + negative < 0) negativesCount[h] += 1;
totalNet[h] += net;
var color = Math.abs(net) < 0.019 ? "black" : (net < 0 ? "red" : "lightgreen");
$('<td>' +