Why Use Google Charts?
There are many reasons to choose Google Chart API over other methods such as Flash or Flex charts.
- Lightweight, reliable, no need for server side libraries or additional modules
- Simple to extend and implement within the Drupal framework
- Memory friendly. Thanks Google for taking the hit ;)
An example using the 7.x version.
$chart = array(
'#chart_id' => 'test_chart',
'#title' => t('Servings'),
'#type' => CHART_TYPE_PIE_3D,
$chart['#data']['fruits'] = 3;
$chart['#data']['meats'] = 2;
$chart['#data']['dairy'] = 5;
echo theme('chart', array('chart' => $chart));
Google code wiki provides documentation for hooks, examples, screenshots, and more. Keep in mind that this documentation has not been updated for the 7.x version although most of the API is the same. See the README.txt and chart.api.php files for more information.
- Victoria Web Design Vision Media
- Boombatower Development