summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-01-26 04:04:32 -0800
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-01-26 04:04:32 -0800
commit73eace6217addd9e2dc72b9f7f628f52de4b7195 (patch)
tree345bd5c1e54fd3dab34a8ba21101eea95828592c
parent3930235b1868a10aeefb88e9e860cec0a4a604d3 (diff)
parent20d74fef8fe8f36d0d4dd1810d972297467fecaa (diff)
Merge pull request #393 from aledeg/statistics
Modification des statistiques pour améliorer la lisibilité
-rw-r--r--app/views/index/stats.phtml15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/views/index/stats.phtml b/app/views/index/stats.phtml
index e531a31dc..487c50a4b 100644
--- a/app/views/index/stats.phtml
+++ b/app/views/index/stats.phtml
@@ -71,9 +71,10 @@ function initStats() {
Flotr.draw(document.getElementById('statsEntryPerDay'),
[<?php echo $this->count ?>],
{
+ grid: {verticalLines: false},
bars: {horizontal: false, show: true},
xaxis: {noTicks: 6, showLabels: false, tickDecimals: 0},
- yaxis: {showLabels: false},
+ yaxis: {min: 0},
mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.y;}}
});
// Feed per category
@@ -81,22 +82,22 @@ function initStats() {
<?php echo $this->feedByCategory ?>,
{
grid: {verticalLines: false, horizontalLines: false},
- pie: {explode: 2, show: true},
+ pie: {explode: 10, show: true, labelFormatter: function(){return '';}},
xaxis: {showLabels: false},
yaxis: {showLabels: false},
- mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.y;}},
- legend: {container: document.getElementById('statsFeedPerCategoryLegend')}
+ mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.series.label + ' - '+ obj.y + ' ('+ (obj.fraction * 100).toFixed(1) + '%)';}},
+ legend: {container: document.getElementById('statsFeedPerCategoryLegend'), noColumns: 3}
});
// Entry per category
Flotr.draw(document.getElementById('statsEntryPerCategory'),
<?php echo $this->entryByCategory ?>,
{
grid: {verticalLines: false, horizontalLines: false},
- pie: {explode: 2, show: true},
+ pie: {explode: 10, show: true, labelFormatter: function(){return '';}},
xaxis: {showLabels: false},
yaxis: {showLabels: false},
- mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.y;}},
- legend: {container: document.getElementById('statsEntryPerCategoryLegend')}
+ mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.series.label + ' - '+ obj.y + ' ('+ (obj.fraction * 100).toFixed(1) + '%)';}},
+ legend: {container: document.getElementById('statsEntryPerCategoryLegend'), noColumns: 3}
});
}
initStats();