Hi I am using this jQuery plugin jCanvas for draving lines.
It work perfect
$("canvas").drawLine({
strokeStyle: "#d96363",
strokeWidth: 5,
x1: 68, y1: 318,
x2: 176, y2: 158,
x3: 566, y3: 138,
x4: 559, y4: 199,
x5: 68, y5: 318
});
But in my javascript source is generating string suradnice which looks (for example with same values) :
x1: 68, y1: 318, x2: 176, y2: 158, x3: 566, y3: 138, x4: 599, y4: 199, x5: 68, y5: 318
and I need to draw lines with values in the string suradnice
function draw_graph(suradnice){
$("canvas").drawLine({
strokeStyle: "#d96363",
strokeWidth: 5,
suradnice //Here
}));
}
How can I fix it?