Created
July 28, 2010 18:40
-
-
Save cimm/495757 to your computer and use it in GitHub Desktop.
Easiest way to draw a line graph with gRaphael
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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