1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00
This commit is contained in:
Moc
2014-08-04 10:28:25 +02:00

View File

@@ -337,8 +337,44 @@ class e_chart
var data = google.visualization.arrayToDataTable(".$this->getData().");
var options = ".$this->getOptions()." ;
";
var chart = new google.visualization.AreaChart(document.getElementById('".$id."'));
switch ($this->type)
{
case 'bar':
//
break;
case 'column':
$js .= "var chart = new google.visualization.ColumnChart(document.getElementById('".$id."')); ";
break;
case 'polar':
//TODO
break;
case 'doughnut':
//
break;
case 'pie':
$js .= "var chart = new google.visualization.PieChart(document.getElementById('".$id."')); ";
break;
default:
case 'line':
case 'area':
$js .= "var chart = new google.visualization.AreaChart(document.getElementById('".$id."')); ";
break;
}
$js .= "
chart.draw(data, options);
}