Widget:CharlesSVG: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 52: Line 52:
         </script>
         </script>


      <!--Red Circle via D3.js-->
      <script>
        var width = 300;
        var height = 300;
        //Create SVG element
        var svg = d3.select("#svgcontainer")
            .append("svg")
            .attr("width", width)
            .attr("height", height);
        //Append circle
        svg.append("circle")
            .attr("cx", 200)
            .attr("cy", 50)
            .attr("r", 20)
            .attr("fill", "red");
      </script>




   </body>
   </body>
</html>
</html>