Add per-hour event counts.

This commit is contained in:
Ian Gulliver
2015-12-31 10:51:42 -08:00
parent 84fb696be4
commit cbc4fa4cee
2 changed files with 7 additions and 1 deletions

View File

@@ -795,8 +795,10 @@ BabyStats.prototype.updateDisplayPage_ = function() {
}.bind(this));
cutoffs.forEach(function(cutoff, i) {
var hours = cutoff[1] / (60 * 60);
var perHour = Math.round((counts[i] / hours) * 100) / 100;
this.displayEventCountCells_[tile.type][cutoff[0]].textContent =
counts[i];
counts[i] + '\n(' + perHour + '/hour)';
}.bind(this));
}.bind(this));
};