0
我已經創建了一個內部維度來切斷d3中的繪圖。這裏是代碼:d3用於鍍鉻svg變換的解決方法
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height);
var nestedSVG = svg.append('svg')
.attr("width", innerWidth)
.attr("height", innerHeight)
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
這在Firefox中正常工作。但是我知道chrome不支持像這樣的svg轉換(並且它不能在chrome中工作)。有沒有解決方法,以便我可以轉換nestedSVG?
爲什麼不將「nestedSVG」附加到div上? – 2014-12-03 23:36:53
SVG 1.1中明確禁止在