diff options
| author | 2014-09-29 18:57:40 -0400 | |
|---|---|---|
| committer | 2014-10-09 15:58:10 +0200 | |
| commit | 0965aecefef0fa1e67e649d24c6d4b3ba0e143c1 (patch) | |
| tree | be2172e931bc8f80c859421af4494e208e2af8e6 | |
| parent | d6396be41ad140fb61f9d31a6a5d51aab427cc65 (diff) | |
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
| -rw-r--r-- | app/views/stats/index.phtml | 9 | ||||
| -rw-r--r-- | app/views/stats/repartition.phtml | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/app/views/stats/index.phtml b/app/views/stats/index.phtml index 412e77e16..bbdcfaec8 100644 --- a/app/views/stats/index.phtml +++ b/app/views/stats/index.phtml @@ -92,7 +92,14 @@ function initStats() { } // Entry per day 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}, 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 }], { |
