开发者

Add line to existing linechart

开发者 https://www.devze.com 2023-02-08 13:01 出处:网络
There doesn\'t seem to be a whole lot of documentation on graphael available, so I ask here to find out i开发者_StackOverflow社区f anyone tried that before. Is it possible to add a line to an already

There doesn't seem to be a whole lot of documentation on graphael available, so I ask here to find out i开发者_StackOverflow社区f 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消