The following piece of code gives an example of how to create SVG groups using D3.js, add graphical elements to these groups and simultaneously set attributes of elements belonging to a particular group. Scroll below to see the resulting figure.
The above code gives:
Thanks! I never really understood groups from other tutorials but this helped so much!
ReplyDeleteThanks! Used this to figure out how to make an SVG with a dark background color (just add a rectangle).
ReplyDelete