Cross-filtering, brushing, and zoom in dashboards: make selection effects clear
Cross-filtering uses a choice in one chart to recalculate other charts. Brushing and linking send selected points or ranges to another view to highlight or filter related records. Zoom narrows the visible axis range for closer inspection. These actions can look similar, but they change different things, so show users what changed and how to undo it.
What does each interaction change?
| Interaction | User input | What changes | Useful question |
|---|---|---|---|
| Cross-filter | Select a category or mark in one chart | Rows that do not match are excluded from other charts’ calculations | “What do sales and product mix look like for the North region alone?” |
| Brushing and linking | Select points or an x/y interval in a chart | Matching records or periods are highlighted in another view, or filtered if configured that way | “Which products and customers appear in this selected period?” |
| Zoom and pan | Adjust the range with a wheel, zoom control, drag, or similar input | The axis domain or viewport changes. Records are not excluded unless a separate filter is connected. | “Can I inspect this month’s sharp change in a long time series?” |
A filter changes which rows contribute to results. Highlighting keeps unselected data visible for context while drawing attention to the selection. Zoom shows a closer view of the same data. A product may combine these behaviors, so do not make people guess from an icon or gesture; say whether a selection filters or highlights.
Distinguish the actions in a dashboard example
Suppose a monthly-orders dashboard has a region map, weekly order trend, and product bar chart. This is a hypothetical design example.
Selecting North on the map and recalculating all three charts for North orders is cross-filtering. Show the active condition and remaining count, such as “Region: North · 240 orders.” If comparison with other regions matters, consider highlighting North instead of hiding the rest. Filtering can change totals and percentage denominators, so state whether the displayed values use all orders or only the selected orders.
Brushing the first two weeks of April in the trend chart and highlighting products for that period is brushing and linking. The views need a shared matching field, such as date or order ID. Without a valid relationship, selecting a mark may do nothing or highlight the wrong records. Do not invent a match when no data link exists; explain that the connection is unavailable.
Zooming the trend to April changes the visible range. January to March is outside the current view, not removed from the filtered data. If the same brush also filters another view, the interaction both narrows the display and excludes data elsewhere. Show both states and let users clear them independently.
Choose highlighting or filtering
Prefer highlighting when comparison context matters. Filtering can be useful when the user needs to analyze a subset or the remaining data creates visual clutter. If both are used, identify which views are filtered and which are only highlighted. Show “no results” when a selection matches zero rows, and distinguish that from data that was never available.
If users can make multiple brushes, decide whether the selections combine as a union, an intersection, or only one selection at a time. Vega-Lite supports global, union, and intersect resolution for multi-view selections. Whichever rule you choose, make the scope and result visible. If entire panels disappear, users have to guess why. In a Vega-Lite multi-view scatterplot matrix, global uses one brush shared across the display, union includes points in any brush, and intersect includes only points in every brush. These describe Vega-Lite selection resolution, not universal names or defaults for all BI tools.
Preserve context and a way back while zoomed
Zoom can make detail readable but hide the wider period or distribution. Show the current axis range or selected interval, and preserve an overview or miniature trend so users know where they are in the whole. A narrow vertical scale can make changes appear larger, so label the current scale clearly.
In the current Vega-Lite documentation, an interval selection represents a continuous range; binding it to a view’s scales enables panning and zooming. The documented default clear event for selection parameters is a double-click, but do not expect users to discover that. Provide visible controls such as “Clear selection,” “Show full period,” and “Reset filters.” Clearing a selection and restoring the initial axis range can be separate states, depending on the implementation.
Provide keyboard and pointer alternatives
A drag-only brush makes range selection difficult for people who cannot perform precise pointer movements. Offer a way to set the start and end without dragging, such as click/tap endpoints or range inputs, and make comparable selection and clearing available by keyboard. Do not require only a wheel or pinch gesture for zoom; provide zoom buttons or range inputs. Controls need readable names, current values, and visible keyboard focus.
WCAG 2.2’s keyboard criterion requires functionality to be operable by keyboard. Its pointer-gesture criterion requires a single-pointer alternative for multipoint or path-based gestures, and its dragging criterion requires a single-pointer way to perform drag-based functionality without dragging. Keyboard support alone does not replace the click/tap alternative. Keep a static overview or summary table so data remain available when interaction cannot be used.
Design and verify in order
Define the reader’s question, selectable categories or intervals, and the common fields needed to link views.
Record per view whether each action filters rows, highlights marks, or changes an axis domain.
Choose how multiple selections combine. Make full filtering, local highlighting, and date-range zoom distinguishable.
Show active conditions, selected counts, current axis range, and no-result states. State the denominator or total basis when filtering changes it.
Provide separate controls for clearing a selection, resetting zoom, and clearing all filters.
Test pointer, touch, and keyboard selection and recovery, including matching results, no results, multiple selections, mobile layout, long labels, and return to the overview.
Finally, verify that totals and denominators change as intended and that clearing all filters restores the expected default data and axis range. To help people find data, explain both how to interact and what the interface changes and how to leave that state.
Sources
[Vega-Lite: Selection Parameters](https://vega.github.io/vega-lite/docs/selection.html)
[Vega-Lite: Dynamic Behaviors with Parameters](https://vega.github.io/vega-lite/docs/parameter.html)
[W3C WAI: Understanding WCAG 2.2 Keyboard](https://www.w3.org/WAI/WCAG22/Understanding/keyboard.html)
[W3C WAI: Understanding WCAG 2.2 Pointer Gestures](https://www.w3.org/WAI/WCAG22/Understanding/pointer-gestures.html)
[W3C WAI: Understanding WCAG 2.2 Dragging Movements](https://www.w3.org/WAI/WCAG22/Understanding/dragging-movements.html)