function charts_graphs_test in Charts and Graphs 6
Same name and namespace in other branches
- 6.2 charts_graphs.module \charts_graphs_test()
- 7.2 charts_graphs.module \charts_graphs_test()
- 7 charts_graphs.module \charts_graphs_test()
For testing and Advanced Help examples.
Return value
<string>
1 string reference to 'charts_graphs_test'
- charts_graphs_menu in ./
charts_graphs.module - Implementation of hook_menu().
File
- ./
charts_graphs.module, line 49
Code
function charts_graphs_test($submodule = 'open-flash', $type = 'bar', $title = 'The Title') {
$canvas = chart_graphs_get_graph($submodule);
if ($type == 'pie' || $type == 'donut') {
$series = array(
'Some Value' => array(
91,
60,
70,
90,
5,
72,
63,
9,
72,
),
);
}
else {
$series = array(
'Some Value' => array(
91,
60,
70,
90,
5,
72,
63,
9,
72,
),
'Page Views' => array(
63,
70,
94,
50,
7,
62,
93,
71,
3,
),
);
}
$canvas->title = check_plain($title);
$canvas->type = $type;
$canvas->y_legend = 'Y Legend';
$canvas->colour = 'white';
$canvas->series = $series;
$canvas->x_labels = array(
'one',
'two',
'three',
'four',
'five',
'six',
'seven',
'eight',
'nine',
);
$out = $canvas
->get_chart();
return $out;
}