Lattice Grid Buy a licence

Charts ยท console.warn

"viewportFilter" on a {type} chart filters t...

Printed by Charts, prefixed [lattice], since 1.87.0.

Warnings reference › chart:*:viewportFilter:zoom

Identifier
chart:*:viewportFilter:zoom
Raised by
Charts
Since
1.87.0

What happened

viewportFilter on a cartesian chart makes the grid follow the chart's visible range, and the range only moves when the chart can be zoomed. With no zoom there is nothing to follow, so no condition was written rather than the option being accepted in silence.

The fix

Set zoom: true (or a zoom object) beside viewportFilter.

The smallest fix

createChart({ grid, container, type: 'line', x: 'day', y: 'price', zoom: true, viewportFilter: true });

Reference

Covered in full at the API reference.