Add line to existing linechart

538 views Asked by At

There doesn't seem to be a whole lot of documentation on graphael available, so I ask here to find out if anyone tried that before. Is it possible to add a line to an already existing linechart (r.g.linechart)? And if, how would I go about doing that?

Thanks a lot, Max

1

There are 1 answers

0
djodja On

This is the way I'm using to get two linecharts in one canvas:

var x = [-1,-0.5,4,5];
var y = [0,0.5,0.6,1];
var xs = [-2,1,1.5,2];
var ys = [0,0.5,0.6,1];
var r = Raphael('myGraph');
r.g.txtattr.font = "12px 'Fontin Sans', Fontin-Sans, sans-serif";
var linec = r.g.linechart(70,70,500,300,x,y, {"colors":["#004A88"], axis:"0 0 1 1"});
var dotc = r.g.linechart(70, 70, 500, 300, xs, ys, {symbol:"o","colors":["#7BA700"], axis:"1 1 0 0",nostroke: true});

Hope this helps, but maybe you know this already.