I have a viewBox on my svg element. I simply wish for it to scale the svg to scale if the browser screen has been made smaller. However, if I try to set the width & height for my svg symbol also it STOPS scaling.
var svg = d3.select("#svgpath").append("svg:svg")
.attr("viewBox", "0 0 1000 730")
.attr("width", "900")
.attr("height", "650")
.attr("preserveAspectRatio", "xMinYMin meet")
.append("svg:g")
.attr("transform", "translate(500,430)");
Could anyone tell me why is behaves normally without width & height. I wish to have a set width & height.
thanks