function ChartsGraphsCanvas::__construct in Charts and Graphs 6.2
Same name and namespace in other branches
- 7.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 105 - 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 = array(
'#0000FF',
'#FF0000',
'#FFFF00',
'#87907D',
'#21B6A8',
'#177F75',
'#B6212D',
'#7F171F',
'#B67721',
'#7F5417',
'#FF8000',
'#FFC080',
'#FFDFBF',
'#FFC080',
'#FFCC00',
'#FFE500',
'#FFF9BF',
'#78C0E9',
'#179CE8',
'#30769E',
'#C8E9FC',
'#ECF8FF',
'#00CCFF',
'#4086AA',
'#91C3DC',
);
}