https://stackoverflow.com/questions/17057809/d3-js-what-is-g-in-appendg-d3-js-code
104
22
I am new to D3.js
, started learning today only
I looked the the donut example and found this code
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height)
.append("g")
.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
I searched for documentation, but did not understood what .append("g")
is appending
Is it even D3
specific?
Looking for guidance here
- 5Good answers coming in below. Possible worth checking out the following youtube video from D3Vienno on grouping in D3. youtube.com/watch?v=SYuFy1j8SGs Actually, if you're starting out, the whole series is worth watching :-). – d3noob Jun 12 '13 at 9:33
96
It appends a 'g' element to the SVG. g
element is used to group SVG shapes together, so no it's not d3 specific.
'코딩' 카테고리의 다른 글
atom vscode 단축키 (0) | 2018.11.18 |
---|---|
d3 : path의 d, d3의 function d (0) | 2018.11.17 |
Atom 패키지 / vscode extention (0) | 2018.11.13 |
웹서버 운영 : 윈도우 (아파치, 설치, 웹서버와 http, 웹브라우저와 웹서버의 통신) (0) | 2018.11.11 |
에러: Solution to Chrome Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource. (1) | 2018.11.11 |