diff options
| author | 2014-09-29 18:54:03 -0400 | |
|---|---|---|
| committer | 2014-10-09 16:00:15 +0200 | |
| commit | 57d4914bf81f3380fe55fa06b7b312f1c463e3e3 (patch) | |
| tree | 82e34de811ef3a9885bdfb7a5a2c9de70a384291 /app/views | |
| parent | 0965aecefef0fa1e67e649d24c6d4b3ba0e143c1 (diff) | |
Add an average per day for the 30 day period
Conflicts:
app/views/stats/index.phtml
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/stats/index.phtml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/views/stats/index.phtml b/app/views/stats/index.phtml index bbdcfaec8..37803f2f9 100644 --- a/app/views/stats/index.phtml +++ b/app/views/stats/index.phtml @@ -91,6 +91,10 @@ function initStats() { return; } // Entry per day + var avg = []; + for (var i = -31; i <= 0; i++) { + avg.push([i, <?php echo $this->average?>]); + } Flotr.draw(document.getElementById('statsEntryPerDay'), [{ data: <?php echo $this->count ?>, @@ -102,8 +106,7 @@ function initStats() { }], { grid: {verticalLines: false}, - bars: {horizontal: false, show: true}, - xaxis: {noTicks: 6, showLabels: false, tickDecimals: 0}, + xaxis: {noTicks: 6, showLabels: false, tickDecimals: 0, min: -30.75, max: -0.25}, yaxis: {min: 0}, mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return numberFormat(obj.y);}} }); |
