I would like support for the Google-o-meter chart type. I use it on http://testing.drupal.org/pifr/status. The chart API works for everything else, except that.

http://code.google.com/apis/chart/types.html#gom

CommentFileSizeAuthor
#2 chart.module.patch534 bytesquickcel

Comments

tjholowaychuk’s picture

It looks terrible haha.. and I dont support Drupal anymore sorry. Hopefully the maintainer will consider it though, I am not sure if he is actually working on the project at all

quickcel’s picture

StatusFileSize
new534 bytes

Attached is a pretty simple patch to get the google-o-meter to display. All you really need to do is add a new variable for the chart type:

define('CHART_TYPE_GMETER', 'gom');

Here is an example of how you can use it:

<?php
$chart = array(
  '#chart_id' => 'gmeter_test',
  '#title' => t('Test'),
  '#type' => CHART_TYPE_GMETER,
);
    
$chart['#data']['test'] = 90;
$chart['#labels'][] = t('Test Label');

echo chart_render($chart);
?>
quickcel’s picture

Status: Active » Needs review
boombatower’s picture

Status: Needs review » Reviewed & tested by the community

Seems to work like a charm. Thanks.

Would be nice if the notices spit out by chart could be removed.

boombatower’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.