diff options
| author | 2014-10-09 16:18:26 +0200 | |
|---|---|---|
| committer | 2014-10-09 16:18:26 +0200 | |
| commit | 799bb6e0de68f5dddde53a6ea7178a518d16cbfa (patch) | |
| tree | b8b7b63edae7b9f7553a5df15f2c53c002b26fb5 /app/views/stats | |
| parent | 6dfbc28042c6e18da9c7578ed626064a4d8c7cb3 (diff) | |
| parent | caf98a6468dcea5ae8c38062e4eb527cb3667db9 (diff) | |
Merge branch 'hotfixes' into beta
Conflicts:
CHANGELOG
README.fr.md
README.md
constants.php
Diffstat (limited to 'app/views/stats')
| -rw-r--r-- | app/views/stats/index.phtml | 18 | ||||
| -rw-r--r-- | app/views/stats/repartition.phtml | 6 |
2 files changed, 18 insertions, 6 deletions
diff --git a/app/views/stats/index.phtml b/app/views/stats/index.phtml index 412e77e16..fa57a77c0 100644 --- a/app/views/stats/index.phtml +++ b/app/views/stats/index.phtml @@ -48,6 +48,7 @@ <th><?php echo _t ('feed'); ?></th> <th><?php echo _t ('category'); ?></th> <th><?php echo _t ('stats_entry_count'); ?></th> + <th><?php echo _t ('stats_percent_of_total'); ?></th> </tr> </thead> <tbody> @@ -56,6 +57,7 @@ <td><a href="<?php echo _url('stats', 'repartition', 'id', $feed['id']); ?>"><?php echo $feed['name']; ?></a></td> <td><?php echo $feed['category']; ?></td> <td class="numeric"><?php echo formatNumber($feed['count']); ?></td> + <td class="numeric"><?php echo formatNumber($feed['count'] / $this->repartition['all_feeds']['total'] * 100, 1);?></td> </tr> <?php endforeach;?> </tbody> @@ -91,12 +93,22 @@ 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'), - [<?php echo $this->count ?>], + [{ + data: <?php echo $this->count ?>, + bars: {horizontal: false, show: true} + },{ + data: avg, + lines: {show: true}, + label: "<?php echo $this->average?>" + }], { 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);}} }); diff --git a/app/views/stats/repartition.phtml b/app/views/stats/repartition.phtml index b425c1458..750a3ffdc 100644 --- a/app/views/stats/repartition.phtml +++ b/app/views/stats/repartition.phtml @@ -67,7 +67,7 @@ function initStats() { }, { data: avg_h, lines: {show: true}, - label: <?php echo $this->averageHour?>, + label: "<?php echo $this->averageHour?>", yaxis: 2 }], { @@ -96,7 +96,7 @@ function initStats() { }, { data: avg_dow, lines: {show: true}, - label: <?php echo $this->averageDayOfWeek?>, + label: "<?php echo $this->averageDayOfWeek?>", yaxis: 2 }], { @@ -126,7 +126,7 @@ function initStats() { }, { data: avg_m, lines: {show: true}, - label: <?php echo $this->averageMonth?>, + label: "<?php echo $this->averageMonth?>", yaxis: 2 }], { |
