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

Make D3 v4 Charts Responsive with the viewBox attribute

Make D3 v4 Charts Responsive with the viewBox attribute

9:51
Making SVGs responsive is unfortunately not as simple as adding some media queries. This lesson introduces the `viewBox` attribute, which is used to control how SVGs scale. We’ll also examine a reusable function that can be used to make nearly any visualization responsive.
Watch this lesson now
Avatar
egghead.io

Making SVGs responsive is unfortunately not as simple as adding some media queries. This lesson introduces the viewBox attribute, which is used to control how SVGs scale. We’ll also examine a reusable function that can be used to make nearly any visualization responsive.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?