You are here

chart.api.php in Google Chart Tools: Image Charts 6

Same filename and directory in other branches
  1. 7 chart.api.php

Hooks provided by the Chart module.

File

chart.api.php
View 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

Namesort descending Description
hook_chart_alter Perform alterations on a chart before it's rendered.