liveBook · Manning

Responsive web design

As explained in D3.js in Action, Third Edition

Responsive web design is an approach to building websites that adapts layout and presentation to different screen sizes and devices.

Responsive web design adapts layout and presentation to common screen sizes and interaction modes, including desktop, tablet, mobile, mouse, and touch. For data visualizations, responsiveness requires more than text wrapping or image resizing: encoding, scales, annotations, and chart structure may need to change. section 9.1

Figure 9.1 In July 2023, mobile devices accounted for 56% of the overall traffic on the internet, desktops 42%, and tablets 2%. (Source: Statcounter)
figure

Mobile access makes responsive visualization important: the July 2023 internet traffic breakdown shows mobile devices at 56%, desktops at 42%, and tablets at 2%. section 9.1

Choose a strategy and adapt the visual result to the available space:

  • Use a mobile-first approach when the smallest screen and touch interaction should establish the design baseline. section 9.1
  • Use a desktop-first approach when the wider layout establishes the primary visual structure. section 9.1
  • Dynamically resize labels, reduce axis ticks, and remove secondary information as screen width decreases. section 9.5
  • Use responsive grids for collections of visualizations or mixed visualization-and-text layouts, and change mainly horizontal charts to a phone-friendly orientation when appropriate. section 9.0 section 9.5

Treat responsiveness as an accessibility requirement. Preserve an equivalent experience across screen sizes, keep legends and plots readable on small screens, and avoid generic inline styles that override user stylesheets. section 10.2.5 section 10.3

How D3.js in Action, Third Edition covers it

How deep it goes
Explains mobile-first and desktop-first strategies plus concrete layout adaptations, while deferring any one-size-fits-all solution.
Examples
Uses resized labels, fewer axis ticks, removed secondary information, responsive grids, changed chart orientation, and adapted legends.
What you can do after
Apply it via D3 by adapting visualization labels, axes, layouts, information density, orientation, and supporting elements to screen size.
How it connects
Connects responsive design with data visualization, responsive grids, mobile-first design, desktop-first design, and accessibility.

Also explained in

Compare how 7 books explain responsive web design →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of D3.js in Action, Third Edition. The section links point to the parts of the book it draws on.