function drawline(x1, y1, x2, y2) { line = document.createElementNS('http://www.w3.org/2000/svg', 'line'); line.setAttribute("id", "myline line.setAttribute("stroke", "black"); line.setAttribute("stroke-width", "2"); line.setAttribute("x1", x1); line.setAttribute("y1", y1); line.setAttribute("x2", x2); line.setAttribute("y2", y2 mainSvg.appendChild(line); } function drawtext(x, y, value) { text = document.createElementNS('http://www.w3.org/2000/svg', 'text'); text.setAttribute("id", "mytext"); text.setAttribute("fill", "black"); text.setAttribute("x", x); text.setAttribute("y", y); text.textContent= value; document.body.appendChild(text); mainSvg.appendChild(text); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)