From 0273d70259348b30be958d13801b4279099c7925 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 16 Sep 2007 15:38:37 +0000 Subject: [PATCH] qhoxie: modified chart generation for usability (merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42098 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/control/Statistics.php | 48 +++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/core/control/Statistics.php b/core/control/Statistics.php index 2d74d9789..50ba0ef73 100644 --- a/core/control/Statistics.php +++ b/core/control/Statistics.php @@ -16,16 +16,28 @@ class Statistics extends Controller { { $top = << +
+

Trends

+
+
Legend
+
END; - $ds = "var tchartdata = { \n"; + $ds = "var chartdata = { \n"; foreach($table as $class) { $record = DataObject::get($class, "", "Created DESC"); @@ -38,6 +50,7 @@ END; $startmonth = new DateTime($props['Created']); $startmonth = $startmonth->Format('m'); + if($filter == "day") { $days = new DateTime($props['Created']); $days = $days->Format('t'); @@ -112,7 +125,7 @@ END; $opts = << +

Registered Users

@@ -164,6 +178,7 @@ END; $records = DataObject::get('PageView', null, 'Created DESC', null, $limit); $top = << +

Recent Page Views

IDEmailJoined
@@ -241,6 +256,7 @@ END; } $top = << +

Page Views

IDTimeBrowserOSUserPage
@@ -268,12 +284,21 @@ END; static function BrowserChart($type = "Pie", $color = "blue") { $top = << +
+

Browsers

+
+
END; @@ -304,15 +329,8 @@ END; $opts = <<
IDTimeBrowserOSUserPage