This patch adds a basic Drupal theme function and simple jQuery wrapper around gRaphael.

jQuery bindings work like this:

// Render a bar graph on the my-graph div
$('div.my-graph').graphael('bar', [0, 5, 10, 15]);

Drupal theme function works like this:

$values = array(5, 10, 15);
theme('graphael', 'pie', $values);

Comments

yhahn’s picture

Another revision of this patch is coming that adds simple shortcuts for hover/labeling behaviors.

yhahn’s picture

StatusFileSize
new12.1 KB
  • Adjustments to theme function signature and jQuery plugin wrapper for better future extensibility.
  • Addition of "extend" key in Drupal.settings.graphael[graph] for storing additional data that may be used in hovers, other graph interactions.
  • Added simple labeling API functions and implementation @ extend.label

Currently tracking patch work here: http://github.com/yhahn/raphael

Will White’s picture

StatusFileSize
new12.13 KB

New version of this patch that fixes an issue with flickering labels.

Will White’s picture

StatusFileSize
new12.15 KB

New version that adds the the "graphaelProcessed" class.

yhahn’s picture

StatusFileSize
new12.5 KB

Fix for $().graphael.elementPosition() method.

yhahn’s picture

StatusFileSize
new12.49 KB

#Fail. Removing stray console.log()

yhahn’s picture

StatusFileSize
new12.73 KB

New update.

Introduces attach.drupal convention to allow others to bind to the graphael graph prior to initialization.

yhahn’s picture

StatusFileSize
new12.72 KB

Small fix for attach.drupal trigger.

yhahn’s picture

StatusFileSize
new13.54 KB

Adding extension for handling clickable graph elements.

mikl’s picture

Sorry for not following up on this earlier, it seems I have failed to enable e-mail notifications for this module. This stuff looks awesome :)

mikl’s picture

Version: 6.x-1.0-beta1 » 6.x-1.x-dev
Status: Needs review » Fixed

I’ve merged this into HEAD. If nothing crops up the next couple of days, I’ll release this as beta2, and use that as a starting point for porting this module to Drupal 7.

Status: Fixed » Closed (fixed)

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