My favorites | Sign in
Project Home Downloads Wiki
Search
for
Overview  
Drupal Chart API Overview.
overview
Updated Feb 4, 2010 by tjholowayhuk@gmail.com

This drupal module provides for a simple, elegent, and extendable API for creating dynamic charts.

Features

  • 10 chart types
  • Memory Free Chart Rendering
  • Saving of charts to local file system
  • Hooks to alter and modify exsisting charts
  • Color schemes which "stick" with the context of your content
  • Custom color schemes
  • Styles
  • Global style overrides
  • Global width & height overrides
  • and more.

Why Use Google Charts?

There are many reasons to choose Google Charts API over other methods such as Flash or Flex charts.

  • Lightweight, reliable, no need for server side libraries
  • Simple to extend and implement within the Drupal framework
  • Memory friendly. Thanks Google for taking the hit :)

Additional Documentation

For further documentation on the creation of charts visit http://code.google.com/apis/chart

Screen Shots

View the Screenshots page for more.

Comment by xela...@gmail.com, Jun 19, 2008

comment

Comment by rov...@gmail.com, Sep 12, 2008

Can this be used in conjunction with Google Data API to gathering data from google finance?

Comment by sietbuk...@gmail.com, Sep 19, 2008

I guess you can, why don't you try? and then tell us :)

Comment by davidwht...@gmail.com, Oct 2, 2008

excellent module, thank!

Comment by o...@securitybay.co.uk, Nov 14, 2008

I just used this at http://www.buybub.com/microsoft-office-publisher-2007 but I'm wondering if I can get a text map for this chart prepresenting the precentage in numbers?

Comment by jakob.malm, Dec 13, 2008

How would I use values from CCK nodes together with Chart API? I have a node type with an int field and a date field, and I want to plot all such nodes in a line diagram.

Comment by joel.bro...@gmail.com, Apr 3, 2009

Had a small issue with 'scaling' bar charts - the data was good, yet the bars were too short. After I added the following on lines:

267 chart_append('chds', $chart['#scaling'], $data);

469 // Scaling 470 case 'chds': 471 $data[$attr] = implode(',', $value); 472 break;

...I can set the scaling factor for the bars to be the same as what is labeled on the y-axis. Eg.

$chart['#scaling'] = array(0,25); $chart['#mixed_axis_labels']CHART_AXIS_Y_LEFT?0? = chart_mixed_axis_range_label(0, 25);

Also, this module works great with the panels module.

Comment by harry.waye@gmail.com, May 1, 2009

Looks good. I'd be interested to see if we can't offload some chart processing to the client also, by use of SVG. Something akin to what Wt Toolkit achieves: http://www.webtoolkit.eu/wt/examples/charts/charts.wt

Falling back to Google's API as necessary.

Comment by arthur.m...@gmail.com, Aug 24, 2009

I created a simple view containing integers and dates (x axix) I selected the 'chart' format and now I get this error when I browse to the view:

I get a javascript popup when I try to save the configuration, and then I get another horrible error message when viewing the page:

Fatal error: Call to a member function set_data() on a non-object in /homepages/34/d120128838/htdocs/halleloo.com/trackfit/modules/views_charts/views_plugin_style_chart.inc on line 112

what can I do about this? I have a customer that wants to chart user-reported data, and I was hoping this module would do the trick.

Any suggestions? I got the same error running version 6.x and also the dev version

Comment by ionrus...@gmail.com, Oct 1, 2009

i have the same problem

Fatal error: Call to a member function set_data() on a non-object in /home/sites/all/modules/views_charts/views_plugin_style_chart.inc on line 135

this line contains $canvas->set_data($cgp_data->rows, $cgp_data->x_labels);

set_data ... any ideas ?

Comment by ionrus...@gmail.com, Oct 1, 2009
abstract function set_data($rows, $x_labels);

/
  • Constructor function.
  • <p>ATTENTION: This function should NOT be called directly.
  • You should always instantiate a chart implementation
  • class using chart_graphs_get_graph() factory function.
  • <p>CAUTION: PHP does not implicitely call parent constructors. DO NOT
  • override this function, or if you do: make sure to call it from the
  • child implementation with: parent::contrusct();
  • within the child constructor.

Comment by hendraki...@gmail.com, Jan 18, 2010

Is there anyway I can break a long chart title into two lines? Adding "\n" in between doesn't work, it literally print out the \n character.

Comment by pgm.mela...@gmail.com, Jun 14, 2010

If you are going to create charts with the same #chart_id in a loop you might get identical rendered charts even though you send different data each time.

Tip: Use a unique #chart_id in each loop! That way charts will be rendered with the correct data.

Comment by prettyki...@gmail.com, Jul 9, 2010

How can i generate a chart, that compare 2 differents data range?

Comment by g...@killeraces.com, Sep 27, 2010

Links to other parts of this wiki:

Home http://code.google.com/p/drupal-chart-api/wiki/

Functions, constants, etc. http://code.google.com/p/drupal-chart-api/wiki/PublicAPI

Examples (very helpful for getting started) http://code.google.com/p/drupal-chart-api/wiki/Examples

Comment by Rinaldo....@gmail.com, Nov 24, 2010

Great module.

Have you planned to support also the Interactive Charts of Google?

Google Chart Tools / Interactive Charts (aka Visualization API) http://code.google.com/intl/de-DE/apis/visualization/documentation/gallery/annotatedtimeline.html

Comment by stie...@gmail.com, Dec 4, 2010

Can any kind sole explain how to use a cck date field along with ints to plot changes of the ints over dates ?

Comment by dibya.du...@gmail.com, Apr 23, 2011

I hv installed the module but don't know how to use it creating content and view ?

Comment by roby.bru...@gmail.com, Nov 16, 2011

Is it possible to get plots with unequally spaced data inserting something like cht=lxy chd=t:10,20,40,80,90,95,99|20,30,40,50,60,70,80|

-1|5,10,22,35,85


Sign in to add a comment
Powered by Google Project Hosting