Charts And Graphs

Feed Activity Graph

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

  1. amCharts - Commercial / Free with an ad link
  2. Bluff - Beautiful Graphics in Javascript - MIT license
  3. 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 releasesDateSizeLinksStatus
6.x-1.0-alpha42009-Apr-22270.17 KBRecommended for 6.xThis is currently the recommended release for 6.x.
Development snapshotsDateSizeLinksStatus
6.x-1.x-dev2009-Sep-15273.1 KBDevelopment snapshotDevelopment snapshots are automatically regenerated and their contents can frequently change, so they are not recommended for production use.


 
 

Drupal is a registered trademark of Dries Buytaert.