From f002dbe4ceb8505b237bd67b66365d636bddd4b2 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Mon, 1 Sep 2014 20:58:05 -0400 Subject: Add average on repartition charts. It needs some verification on the value used to calculate the averages. --- app/views/stats/repartition.phtml | 48 ++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 6 deletions(-) (limited to 'app/views/stats') diff --git a/app/views/stats/repartition.phtml b/app/views/stats/repartition.phtml index 9d2eb28e4..2331db78c 100644 --- a/app/views/stats/repartition.phtml +++ b/app/views/stats/repartition.phtml @@ -56,11 +56,22 @@ function initStats() { return; } // Entry per hour + var avg_h = []; + for (var i = -1; i <= 24; i++) { + avg_h.push([i, averageHour?>]); + } Flotr.draw(document.getElementById('statsEntryPerHour'), - [repartitionHour ?>], + [{ + data: repartitionHour ?>, + bars: {horizontal: false, show: true} + }, { + data: avg_h, + lines: {show: true}, + label: averageHour?>, + yaxis: 2 + }], { grid: {verticalLines: false}, - bars: {horizontal: false, show: true}, xaxis: {noTicks: 23, tickFormatter: function(x) { var x = parseInt(x); @@ -70,14 +81,26 @@ function initStats() { max: 23.9, tickDecimals: 0}, yaxis: {min: 0}, + y2axis: {showLabels: false}, mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return numberFormat(obj.y);}} }); // Entry per day of week + var avg_dow = []; + for (var i = -1; i <= 7; i++) { + avg_dow.push([i, averageDayOfWeek?>]); + } Flotr.draw(document.getElementById('statsEntryPerDayOfWeek'), - [repartitionDayOfWeek ?>], + [{ + data: repartitionDayOfWeek ?>, + bars: {horizontal: false, show: true} + }, { + data: avg_dow, + lines: {show: true}, + label: averageDayOfWeek?>, + yaxis: 2 + }], { grid: {verticalLines: false}, - bars: {horizontal: false, show: true}, xaxis: {noTicks: 6, tickFormatter: function(x) { var x = parseInt(x), @@ -88,14 +111,26 @@ function initStats() { max: 6.9, tickDecimals: 0}, yaxis: {min: 0}, + y2axis: {showLabels: false}, mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return numberFormat(obj.y);}} }); // Entry per month + var avg_m = []; + for (var i = 0; i <= 13; i++) { + avg_m.push([i, averageMonth?>]); + } Flotr.draw(document.getElementById('statsEntryPerMonth'), - [repartitionMonth ?>], + [{ + data: repartitionMonth ?>, + bars: {horizontal: false, show: true} + }, { + data: avg_m, + lines: {show: true}, + label: averageMonth?>, + yaxis: 2 + }], { grid: {verticalLines: false}, - bars: {horizontal: false, show: true}, xaxis: {noTicks: 12, tickFormatter: function(x) { var x = parseInt(x), @@ -106,6 +141,7 @@ function initStats() { max: 12.9, tickDecimals: 0}, yaxis: {min: 0}, + y2axis: {showLabels: false}, mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return numberFormat(obj.y);}} }); -- cgit v1.2.3 From 657b1ffe278c2bbd1c23ae906786810ce9c609f4 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 4 Sep 2014 20:30:15 +0200 Subject: Bug HTML stats Categories containing a space were not displayed properly https://github.com/marienfressinaud/FreshRSS/issues/547 --- app/views/stats/repartition.phtml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views/stats') diff --git a/app/views/stats/repartition.phtml b/app/views/stats/repartition.phtml index 2331db78c..d9dc4c89d 100644 --- a/app/views/stats/repartition.phtml +++ b/app/views/stats/repartition.phtml @@ -10,12 +10,12 @@ categories as $category) { $feeds = $category->feeds(); if (!empty($feeds)) { - echo ''; + echo ''; foreach ($feeds as $feed) { if ($this->feed && $feed->id() == $this->feed->id()){ - echo ''; + echo ''; } else { - echo ''; + echo ''; } } echo ''; -- cgit v1.2.3 From 097703f23e6799f9c20d282459c461b0462dc737 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Thu, 18 Sep 2014 17:39:07 +0200 Subject: Improve stat design --- app/views/stats/idle.phtml | 19 +++++++++++---- app/views/stats/index.phtml | 46 ++++++++++++++++++------------------ app/views/stats/repartition.phtml | 8 +++---- p/themes/Dark/dark.css | 12 ++++++++++ p/themes/Flat/flat.css | 12 ++++++++++ p/themes/Origine/origine.css | 12 ++++++++++ p/themes/Screwdriver/screwdriver.css | 12 ++++++++++ p/themes/base-theme/base.css | 12 ++++++++++ p/themes/base-theme/template.css | 8 +++++++ 9 files changed, 109 insertions(+), 32 deletions(-) (limited to 'app/views/stats') diff --git a/app/views/stats/idle.phtml b/app/views/stats/idle.phtml index 2ba5237f7..608e2d33c 100644 --- a/app/views/stats/idle.phtml +++ b/app/views/stats/idle.phtml @@ -1,6 +1,6 @@ partial('aside_stats'); ?> -
+

@@ -12,11 +12,20 @@

-
    - -
  • - + + + +
      +
    • +
      + + + +
      +
    • +
    +
partial('aside_stats'); ?> -
+
- +

-
+

@@ -38,26 +38,9 @@
-
- -
-

-
-
- -
-

-
-
-
- -
-

-
-
-
- -
+

@@ -78,6 +61,23 @@
+ +
+

+
+
+ +
+

+
+
+
+

+
+
+