From 7a7ddb8ece43f17633a0132073e24f170a5b4432 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 14 May 2013 23:51:19 -0700 Subject: [PATCH] InfoPanel using new chart class. Work in progress to convert stats plugin data to use it. --- e107_admin/includes/infopanel.php | 40 ++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/e107_admin/includes/infopanel.php b/e107_admin/includes/infopanel.php index dbfeec1aa..74efb2fce 100644 --- a/e107_admin/includes/infopanel.php +++ b/e107_admin/includes/infopanel.php @@ -223,7 +223,6 @@ EOF; //require_once (e_CORE."shortcodes/batch/admin_shortcodes.php"); e107::getScBatch('admin'); - @@ -309,6 +308,45 @@ EOF; function renderChart() { + $data = array(); + + $data['labels'] = array("January","February","March","April","May","June","July"); + + + $data['datasets'][] = array( + 'fillColor' => "rgba(220,220,220,0.5)", + 'strokeColor' => "rgba(220,220,220,1)", + 'pointColor ' => "rgba(220,220,220,1)", + 'pointStrokeColor' => "#fff", + 'data' => array(65,59,90,81,56,55,40) + + ); + + $data['datasets'][] = array( + 'fillColor' => "rgba(151,187,205,0.5)", + 'strokeColor' => "rgba(151,187,205,1)", + 'pointColor ' => "rgba(151,187,205,1)", + 'pointStrokeColor' => "#fff", + 'data' => array(28,48,40,19,96,27,100) + ); + + + $cht = e107::getChart(); + $cht->setType('line'); + $cht->setData($data,'canvas'); + $text = $cht->render('canvas'); + + + $text .= "
Please note: this are demo stats - upgrade work in progress.
"; + + return $text; + + + + + + + // REQUIRES Log Plugin to be installed. if (e107::isInstalled('log')) {