Charts And Graphs
Modules · Content · Content Construction Kit (CCK) · Content display · Developer · e-Commerce · Theme related · Third-party integration · Utility
irakli - March 4, 2009 - 10:56
Modular Charts & Graphs API for Developers, easily extensible by third-party modules that want to add their own charting implementations.
See: Views Charts for the usage and user-centric application. This module is a framework + collection of implementation modules (under the api folder). Please read README/INSTALL files of the implementations since their installation may involve downloading flash components or third-party libraries. Drupal guidelines does not always allow packaging those with Drupal code.
Implemented Libraries
- amCharts - Commercial / Free with an ad link
- Bluff - Beautiful Graphics in Javascript - MIT license
- Open Flash Chart 2 - LGPL license
Usage Example
<?php
function charts_graphs_test() {
$canvas = chart_graphs_get_graph('open-flash');
$canvas->title = "Open Flash Chart";
$canvas->type = "bar_glass"; //"bar_3d";
$canvas->y_legend = "Y Legend";
$canvas->colour = '#D54C78';
$canvas->series = array(
'Some Value' => array(9,6,7,9,5,7,6,9,7),
'Page Views' => array(6,7,9,5,7,6,9,7,3),
);
$canvas->x_labels = array('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine');
$out = $canvas->get_chart();
return $out;
}
?>Getting the List of Engines/Chart Types Available:
<?php
$apis = chart_graphs_apis ();
echo '<pre>' . print_r( $apis, TRUE) . '</pre>'; // or use dpm($apis); if you have devel module.
exit();
?>Credits
This project is sponsored by Phase2 Technology
Bluff library integration contributed by: Picktek LLC
Releases
| Official releases | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 6.x-1.0-alpha4 | 2009-Apr-22 | 270.17 KB | Download · Release notes | Recommended for 6.x | |
| Development snapshots | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 6.x-1.x-dev | 2009-Sep-15 | 273.1 KB | Download · Release notes | Development snapshot | |
