The chart region to map, in viewport pixels
Dots across the display
Dots down the display
Whether to keep the chart's proportions; defaults to spending every pin
Current zoom factor, where 1 fits the whole plot.
True when the whole plot is visible, so panning would do nothing.
Replaces the chart region, keeping the zoom and pan position. Called when the chart resizes or a different subplot takes focus.
The new chart region, in viewport pixels
Zooms in one step.
True when the zoom level changed
Zooms out one step.
True when the zoom level changed
Resets to the whole plot, centred.
True when the view was not already there
Moves the window one step in a direction.
Which way to move the window over the plot
True when the window actually moved, false when already at that edge
Converts a viewport-pixel point to dot coordinates. The result may fall outside the dot grid, which means the point is outside the visible window.
Horizontal position in viewport pixels
Vertical position in viewport pixels
Reports whether a viewport-pixel rectangle is entirely inside the visible window.
The rectangle to test, in viewport pixels
Centres the window on a viewport-pixel rectangle.
Used to follow the focused mark when navigation takes it off the visible window. Following only on exit — rather than recentring on every move — leaves a manually chosen pan position alone for as long as it still shows what the reader is pointing at.
The rectangle to centre on, in viewport pixels
Describes the current zoom and pan for announcement to the reader.
A zoomed view shows a slice of the chart with no visible frame to say which slice, so the position has to be spoken.
Maps a region of a chart, in viewport pixels, onto a tactile display's dot grid, with a zoom level and a pan position.
Zoom exists because the dot grid is small enough that a whole chart scaled into it loses the detail that distinguishes neighbouring marks. Zooming in spends the same pins on a smaller slice of the chart, which is the only way to resolve marks that would otherwise share a pin — at the cost of having to pan to reach the rest.