liveBook · Manning

Toggle button

As explained in Everyday Data Visualization

A toggle switch is an interface control that lets a user switch between states or viewing options.

A toggle button lets people switch between states or viewing options. In a visualization, it can reveal information, change how data is displayed, or conserve precious space. section 7.2.3

Choose a toggle when:

  • Users need multiple ways to view the same data, such as Fahrenheit versus Celsius. section 7.2.3
  • Space is tight, such as on a mobile device or inside an iframe, and not everything fits onscreen. section 7.2.3
  • Avoid making people toggle for information they need quickly; executives and other time-poor users may not explore hidden controls. section 7.2.3

Three charts, two visible

When a small visualization has room for only two of three charts, show the most important charts first and use a toggle to control which additional chart appears. section 7.2.3

How Everyday Data Visualization covers it

How deep it goes
Compares use cases and trade-offs, but stops short of implementation details or a complete interaction checklist.
Examples
Uses temperature-unit switching, mobile and iframe constraints, and a three-charts-for-two-spaces scenario.
What you can do after
Evaluate whether a visualization should hide content behind a toggle or display it by default.
How it connects
Ties toggles to data visualization, labels, tooltips, responsive layout, and keyboard navigation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Everyday Data Visualization. The section links point to the parts of the book it draws on.