Skip to content

Instantly share code, notes, and snippets.

@cimm cimm/gRaphael.js
Created Jul 28, 2010

What would you like to do?
Easiest way to draw a line graph with gRaphael
// Initialize the Raphael object
var r = Raphael("holder");
// Assign the values for the X axis
var x = [1, 2, 3, 4];
// Assign the values for the Y axis
var y = [1, 2, 1, 3];
// Draw a line chart (startX, startY, width, height, valuesX, valuesY)
r.g.linechart(0, 0, 300, 220, x, y);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.