Problem
XY charts are interactive by default, but interaction_config() only configures hover, click, selection, brush, crosshair, view-change events, and linked views. There is no supported way to make a chart's viewport static.
As a result, dashboard charts that are intended as fixed summaries can still be dragged or wheel-zoomed, leaving bars or axes partially out of view. Hiding the modebar does not disable those gestures, and disabling pointer events on a framework wrapper is brittle because the chart's canvas owns the interaction handlers.
Reproduction
chart = xy.bar_chart(
xy.bar(["A", "B", "C"], [10, 20, 30]),
xy.modebar(show=False),
)
Plain-drag still pans and the wheel still zooms.
Proposed API
xy.interaction_config(pan=False, zoom=False)
pan=False: ignore plain-drag pan gestures.
zoom=False: ignore wheel, box-zoom, double-click reset, and zoom controls.
- Defaults remain enabled for backward compatibility.
- Hover and selection should remain independently configurable.
This would let dashboards use fixed-domain summary charts while keeping deliberately exploratory charts interactive.
Problem
XY charts are interactive by default, but
interaction_config()only configures hover, click, selection, brush, crosshair, view-change events, and linked views. There is no supported way to make a chart's viewport static.As a result, dashboard charts that are intended as fixed summaries can still be dragged or wheel-zoomed, leaving bars or axes partially out of view. Hiding the modebar does not disable those gestures, and disabling pointer events on a framework wrapper is brittle because the chart's canvas owns the interaction handlers.
Reproduction
Plain-drag still pans and the wheel still zooms.
Proposed API
pan=False: ignore plain-drag pan gestures.zoom=False: ignore wheel, box-zoom, double-click reset, and zoom controls.This would let dashboards use fixed-domain summary charts while keeping deliberately exploratory charts interactive.