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:
@@ -226,7 +226,6 @@ EOF;
|
||||
|
||||
|
||||
|
||||
|
||||
$text2 .= $ns->tablerender("Website Status", $this->renderWebsiteStatus(),"",true);
|
||||
|
||||
|
||||
@@ -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 .= "<div class='center'><small>Please note: this are demo stats - upgrade work in progress.</small></div>";
|
||||
|
||||
return $text;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// REQUIRES Log Plugin to be installed.
|
||||
if (e107::isInstalled('log'))
|
||||
{
|
||||
|
Reference in New Issue
Block a user