function QuantChartChartAPI::build in Quant 7
Implements parent::build().
Overrides QuantChart::build
File
- plugins/
QuantChartChartAPI.inc, line 78
Class
- QuantChartChartAPI
- QuantChart plugin class to generate charts using chart.module (Chart API)
Code
function build() {
// Initialize the chart
switch ($this->quant->chartType) {
case 'line':
$this
->line_chart();
break;
case 'bar':
$this
->bar_chart();
break;
case 'pie':
$this
->pie_chart();
break;
}
// Fill the chart with data
switch ($this->quant->dataType) {
case 'single':
$this
->chart_single();
break;
case 'multiple':
$this
->chart_multiple();
break;
case 'count':
$this
->chart_count();
break;
}
// Add color
$this
->color();
// Add size
$this
->size();
}