function ChartsGraphsCanvas::__construct in Charts and Graphs 7.2
Same name and namespace in other branches
- 6.2 charts_graphs_canvas.class.inc \ChartsGraphsCanvas::__construct()
- 7 charts_graphs_canvas.class.inc \ChartsGraphsCanvas::__construct()
Constructor function.
<p>ATTENTION: This function should NOT be called directly. You should always instantiate a chart implementation class using charts_graphs_get_graph() factory function.
<p>CAUTION: PHP does not implicitely call parent constructors. DO NOT override this function, or if you do: make sure to call it from the child implementation with: parent::__construct(); within the child constructor.
File
- ./
charts_graphs_canvas.class.inc, line 131 - abstract class ChartsGraphsCanvas.
Class
- ChartsGraphsCanvas
- Each graphing library implementation should create a derivative of this class.
Code
function __construct($modulename) {
$this->modulename = $modulename;
$this->unique_id = charts_graphs_chart_id_generator();
// Set some default values
$this->width = 500;
$this->height = 250;
$this->title = t('A Drupal Chart');
$this->series_colours = $this
->series_colours();
}