New course! Every coder should learn Generative AI!
Try a free lesson0
You have to use document.createElememtNS("http://www.w3.org/2000/svg", "svg"); to create svg elements. Line 11, 17, 28, 35 etc. And if you do not specify the stroke color the line will not visible, I think. But I don't know how to do it.