Points drawn in the onload event of the SVG element are NOT being displayed when rendered

后端 未结 1 540
感情败类
感情败类 2021-01-06 03:58

I\'m working on drawing an SVG grid using Javascript. I\'ve managed to get the axis drawn, as well as my quadrant labels. However I\'ve run into an issue adding my dynamic p

相关标签:
1条回答
  • 2021-01-06 04:12

    In order to dynamically create SVG elements you have to use the createElementNS method with the appropriate namespace, e.g.

    var dot = SVGDoc.createElementNS("http://www.w3.org/2000/svg", "circle");
    

    For more info, see the tutorials by Kevin Lindsay and especially here.

    0 讨论(0)
提交回复
热议问题