The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Output SVG Elements with D3 v4

Output SVG Elements with D3 v4

5:13
D3 is capable of creating regular DOM elements like divs and buttons, and can even render to canvas, but by far the most common type of output is SVG. In this lesson we’ll convert from DOM elements to SVG elements, and make the updates necessary for maintaining a consistent appearance between the two.
Watch this lesson now
Avatar
egghead.io

D3 is capable of creating regular DOM elements like divs and buttons, and can even render to canvas, but by far the most common type of output is SVG. In this lesson we’ll convert from DOM elements to SVG elements, and make the updates necessary for maintaining a consistent appearance between the two.

Avatar
Andrew

I am really enjoying this course, thank you. In this example, your text doesn't render if a child of rect. Searching around on StackOverflow, it seems like one needs to add a group (g) and append the rect and text elements as siblings within the group. I would like to hear your input.

Avatar
Ben

Watch the next video. :)

In reply to Andrew
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?