Matrix_charts.ViewSourceViewport windowing for zoom and pan.
A view constrains which portion of the data domain is visible. Store a t in your application model and pass it to Matrix_charts.draw. Use empty to show the full data extent.
All window operations produce valid windows: min is always < max, with a minimum span enforced to prevent degenerate ranges.
The type for 1D ranges. Invariant: min < max.
The type for viewport state. None on any axis means "show full domain".
window ~min ~max is a window over [min, max]. If min > max the values are swapped. A minimum span is enforced.
zoom w ~factor zooms around the centre of w. factor > 1 zooms in (smaller range), factor < 1 zooms out. Non-positive factors are treated as 1.0.
zoom_around w ~center ~factor zooms around center, preserving its relative position within the window.