trying to add scrollbar in SVG when the size of the SVG is not enough to display all elements, however not successfully. In this case trying to display all 15 rectangles, however can reach only up to the size of SVG canvas. Adding "overflow" to css didn't help. Any advices how to enable vertical scroll bar?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>D3 World Map</title>
<script src="https://d3js.org/d3.v4.min.js"></script>
<style>
#halfpage{
background: "white";
overflow-y: scroll;
}
</style>
</head>
<body>
<script type="text/javascript">
var elements = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15];
var svgContainer = d3.select("body").append("svg")
.attr("width", 1200)
.attr("height", 700)
.attr("id", "halfpage");
svgContainer.selectAll("rects1")
.data(elements)
.enter()
.append("rect")
.attr("width", 50)
.attr("height", 20)
.attr("x", 475)
.attr("y", function(d, i){
return 100 * i;
})
.style("fill", "brown");
</script>
</body>
</html>