rect1

by Laurie Skelly

HTML

<div id="svg_container"></div>

CSS

#svg_container {
    margin:10px;
}
svg {
    border: 1px solid gray;
}
button {
    margin-left:10px;
}

JavaScript

h = 400;
w = 500;

var svg = 
  d3.select("#svg_container")
    .append("svg")
    .attr("id","svg")
    .attr('height',h)
    .attr('width',w);

svg.append('rect')
	.attr('x',w/2-25)
	.attr('y',h-120)
	.attr('height',100)
	.attr('width',50)