Raphael 1
Raphael test taken from http://jsfiddle.net/saadtazi/vpGyL/ who also references http://blog.fruitsoftware.com/wp-content/raphaeljs/raphael-min.js
by Andy Bulka
HTML
<script src="http://blog.fruitsoftware.com/wp-content/raphaeljs/g.raphael-min.js"></script>
<script src="http://blog.fruitsoftware.com/wp-content/raphaeljs/g.line-min.js"></script>
<div id="testGraph"/>
JavaScript
var r = Raphael('testGraph', 320, 220);
// Creates a simple line chart at 10, 10
// width 300, height 200
var x = 10,
y = 10,
xlen = 300,
ylen = 200,
gutter = 20,
xdata = [0, 2, 4, 6, 8, 10];
var chrt = r.linechart(x, y, xlen, ylen, xdata, [30, 10, 20, 15, 35, 30], {
gutter: gutter,
nostroke: false,
axis: "0 0 0 1",
symbol: "circle",
smooth: true
});
// default gutter: 10
//x, y, length, from, to, steps, orientation, labels, type, dashsize, paper
Raphael.g.axis(
x + gutter, // 10 + gutter
y + ylen - gutter, //y pos
xlen - 2 * gutter, null, null, // used to pass the initial value and last value (number) if no labels are provided
xdata.length - 1, // number of steps
0, ['0', '-2-', '-4-', '-6-', '-8-', '-10-'], // the labels
r // you need to provide the Raphael object
);