Charts ยท console.warn
chart.zoom.set() was called on a chart with ...
Printed by Charts, prefixed [lattice], since 1.72.0.
Warnings reference › chart:*:zoom:off
- Identifier
chart:*:zoom:off- Raised by
- Charts
- Since
- 1.72.0
What happened
A host asked a chart to show a range, but the chart has no zoom: either zoom was never set, or the type it was set on has no axis to narrow. Nothing moved, and it was said rather than returning quietly, because a host driving the chart from its own toolbar would otherwise see buttons that do nothing.
The fix
Set zoom: true on the chart, or zoom: { buttons: 'none' } when the host draws the controls itself.
The smallest fix
createChart({ grid, container, type: 'line', zoom: { buttons: 'none' } }).zoom.set([4, 10]);
Reference
Covered in full at the API reference.