mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
InfoPanel using new chart class. Work in progress to convert stats plugin data to use it.
This commit is contained in:
@@ -223,7 +223,6 @@ EOF;
|
|||||||
//require_once (e_CORE."shortcodes/batch/admin_shortcodes.php");
|
//require_once (e_CORE."shortcodes/batch/admin_shortcodes.php");
|
||||||
e107::getScBatch('admin');
|
e107::getScBatch('admin');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -309,6 +308,45 @@ EOF;
|
|||||||
|
|
||||||
function renderChart()
|
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 .= "<div class='center'><small>Please note: this are demo stats - upgrade work in progress.</small></div>";
|
||||||
|
|
||||||
|
return $text;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// REQUIRES Log Plugin to be installed.
|
// REQUIRES Log Plugin to be installed.
|
||||||
if (e107::isInstalled('log'))
|
if (e107::isInstalled('log'))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user