To get access to the contents of the whole book you need to purchase a copy.
Selection, inspection, and scrolling
Selection and scrolling let users examine chart content beyond what a static presentation can show at once. Selection can reveal the observation, category, interval, or spatial region associated with an interaction, while scrolling preserves the chart's complete domain and exposes a focused portion through a viewport. Both introduce changing state whose meaning depends on the chart data and presentation affected by the interaction.
Swift Charts derives a positional selection from a scale domain rather than hit-testing a rendered mark. The reported value may fall between observations or provide only part of the information needed to identify a meaningful result, so the application resolves it against prepared data before using the result in an inspector or another selection-dependent presentation. A scrollable chart makes a related separation: the complete domain describes all available values, the visible span determines how much fits within the viewport, and the scroll position determines which interval appears.
This chapter develops these interaction models by examining how their values are produced, interpreted, and presented. We begin with positional and range selection before extending the same model to legends and custom gestures. We then apply the same reasoning to scrollable charts, establishing domain and position ownership before examining viewport-relative presentation, scroll phases, and aligned resting positions. These techniques let users inspect selected values and navigate larger domains while retaining the context needed to interpret the chart.