Widget:CharlesSVG: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 19: Line 19:
    
    
       <!--Blue Line via D3.js-->
       <!--Blue Line via D3.js-->
       <div id = "D3BlueLine">
       <div >
       <script>
       <script>
         var width = 300;
         var width = 300;
Line 43: Line 43:
         var width = 300;
         var width = 300;
         var height = 300;
         var height = 300;
        //Create SVG element
         var svg = d3.select("#D3BlueLine")
         var svg = d3.select("#D3BlueLine")
             .append("svg")
             .append("svg")
             .attr("width", width)
             .attr("width", width)
             .attr("height", height);
             .attr("height", height);
        //Create and append rectangle element
            svg.append("rect")
        svg.append("rect")
             .attr("x", 20)
             .attr("x", 20)
             .attr("y", 20)
             .attr("y", 20)
Line 63: Line 61:
         var width = 300;
         var width = 300;
         var height = 300;
         var height = 300;
        //Create SVG element
         var svg = d3.select("#D3BlueLine")
         var svg = d3.select("#D3BlueLine")
             .append("svg")
             .append("svg")