Add string delimiters for averages.

Before, if the average was equal to 0, it was displayed on the graph but the label was not displayed.
Now, the label is displayed.

Conflicts:
	app/views/stats/index.phtml
pull/666/head
Alexis Degrugillier 10 years ago committed by Marien Fressinaud
parent d6396be41a
commit 0965aecefe
  1. 9
      app/views/stats/index.phtml
  2. 6
      app/views/stats/repartition.phtml

@ -92,7 +92,14 @@ function initStats() {
} }
// Entry per day // Entry per day
Flotr.draw(document.getElementById('statsEntryPerDay'), 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}, grid: {verticalLines: false},
bars: {horizontal: false, show: true}, bars: {horizontal: false, show: true},

@ -67,7 +67,7 @@ function initStats() {
}, { }, {
data: avg_h, data: avg_h,
lines: {show: true}, lines: {show: true},
label: <?php echo $this->averageHour?>, label: "<?php echo $this->averageHour?>",
yaxis: 2 yaxis: 2
}], }],
{ {
@ -96,7 +96,7 @@ function initStats() {
}, { }, {
data: avg_dow, data: avg_dow,
lines: {show: true}, lines: {show: true},
label: <?php echo $this->averageDayOfWeek?>, label: "<?php echo $this->averageDayOfWeek?>",
yaxis: 2 yaxis: 2
}], }],
{ {
@ -126,7 +126,7 @@ function initStats() {
}, { }, {
data: avg_m, data: avg_m,
lines: {show: true}, lines: {show: true},
label: <?php echo $this->averageMonth?>, label: "<?php echo $this->averageMonth?>",
yaxis: 2 yaxis: 2
}], }],
{ {

Loading…
Cancel
Save