Skip to content

Instantly share code, notes, and snippets.

@cimm
Created July 28, 2010 18:40
Show Gist options
  • Save cimm/495757 to your computer and use it in GitHub Desktop.
Save cimm/495757 to your computer and use it in GitHub Desktop.
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