Add per-hour event counts.
This commit is contained in:
@@ -215,6 +215,7 @@ babyStatsDisplayEventCountSpacer {
|
||||
babyStatsDisplayEventCountHeaderTitle {
|
||||
display: table-cell;
|
||||
padding: 4px;
|
||||
text-align: center;
|
||||
color: rgb(138,155,15);
|
||||
font-weight: bold;
|
||||
border-left: 1px solid rgb(233,127,2);
|
||||
@@ -228,6 +229,7 @@ babyStatsDisplayEventCountTitle {
|
||||
display: table-cell;
|
||||
padding: 4px;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
color: rgb(73,10,61);
|
||||
font-weight: bold;
|
||||
border-top: 1px solid rgb(233,127,2);
|
||||
@@ -237,7 +239,9 @@ babyStatsDisplayEventCountValue {
|
||||
display: table-cell;
|
||||
padding: 4px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
color: rgb(189,21,80);
|
||||
border-top: 1px solid rgb(233,127,2);
|
||||
border-left: 1px solid rgb(233,127,2);
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user