我试图使用ViewBox&当窗口大小更改时,preserveAspectRatio自动调整我的d3.svg.arc
@H_502_2@var svg = d3.select("#chart").append("svg")
.append("g")
.attr("viewBox","0 0 700 500")
.attr("preserveAspectRatio","xMinYMin meet")
.attr("transform","translate(" + r + "," + r +") rotate(180) scale(-1,-1)");
我有点困惑为什么它根本不工作 – 我也试图将保留设置为“无”&删除我拥有的任何设定的边距.但仍然没有运气 – 任何帮助或建议将不胜感激.
这里有一个例子:http://jsfiddle.net/xwZjN/53/