我是D3.js
新手,今天才开始学习
我查看了donut example,找到了下面的代码
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height)
.append("g")
.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
我搜索了documentation,但不明白.append("g")
追加了什么
它是特定于D3
的吗?
在这里寻找指导
发布于 2013-06-12 14:09:24
它将一个'g' element附加到SVG。g
元素is used to group SVG shapes together,所以它不是特定于d3的。
https://stackoverflow.com/questions/17057809
复制相似问题