You are here

function hook_chart_alter in Google Chart Tools: Image Charts 6

Same name and namespace in other branches
  1. 7 chart.api.php \hook_chart_alter()

Perform alterations on a chart before it's rendered.

Parameters

$chart: An associative array defining a chart.

1 invocation of hook_chart_alter()
chart_build in ./chart.module
Build chart query data.

File

./chart.api.php, line 13
Hooks provided by the Chart module.

Code

function hook_chart_alter(&$chart) {
  if ($chart['#chart_id'] == 'foo') {

    // Change the data color to blue.
    $chart['#data_colors'] = array(
      '027AC6',
    );
  }
}