I downloaded the Drupal found at http://drupal.org/project/charts. I noticed it was a little thin on the documentation so I went through the code and put together some notes for those who might need a little more instructions on how to use it. I thought it would be useful to others. It's a good way to get graphs as content in your website.
There's another animated chart module at http://drupal.org/project/swfcharts but it hasn't been updated for Drupal 6 yet.
DRUPAL CHART API
#PLUGIN PARAMETER VALUES
google_charts
openflashchart
fusioncharts
CHART TYPES (#TYPE parameter values)
|
CHART TYPE |
GOOGLE CHART |
OPENFLASH CHART |
FUSION CHARTS |
|---|---|---|---|
|
line2D |
X |
X |
X |
|
hbar2D |
X |
X |
|
|
vbar2D |
X |
X |
X |
|
pie2D |
X |
X |
X |
|
pie3D |
X |
||
|
pie3D |
X |
||
|
scatter |
X |
||
|
vbar3D |
X |
SAMPLE CODE
Steps
1. Create a page / story
2. Select input format: PHP
3. If using an editor, select SOURCE mode
4. Paste and edit this template.
<p>Here's A Test Google Chart</p>
<?php
$chart = array(
'#plugin' => 'google_charts', // Google Charts API will be used
'#type' => 'line2D', // To show a simple 2D line chart
'#height' => 300, // in pixels
'#width' => 400, // in pixels
'#color' => '336699', // background color, in RRGGBB format
'#title' => t('2015 Sales Projection'), // The chart title
array(
'#legend' => t('Revenue'),
100,
200,
250,
350
), // First series
array(
'#legend' => t('Profit'),
10,
20,
25,
35
), // Second series
);
print charts_chart($chart);
?>


