有没有办法控制d3.js图表的缩放? svg的宽度和高度应与viewBox宽度/高度相同?
var svgroot = d3.select($(el)[0])
.append("svg")
.attr("viewBox", "0 0 " + width + " " + height)
.attr("width", width)
.attr("height", height)
.attr("preserveAspectRatio", "xMidYMid meet");