chart.api.php in Google Chart Tools: Image Charts 6
Same filename and directory in other branches
Hooks provided by the Chart module.
File
chart.api.phpView source
<?php
/**
* @file
* Hooks provided by the Chart module.
*/
/**
* Perform alterations on a chart before it's rendered.
*
* @param $chart
* An associative array defining a chart.
*/
function hook_chart_alter(&$chart) {
if ($chart['#chart_id'] == 'foo') {
// Change the data color to blue.
$chart['#data_colors'] = array(
'027AC6',
);
}
}
Functions
Name | Description |
---|---|
hook_chart_alter | Perform alterations on a chart before it's rendered. |