Charts ยท console.warn
chart.cursor.set() was called on a chart wit...
Printed by Charts, prefixed [lattice], since 1.86.0.
Warnings reference › chart:*:cursor:off
- Identifier
chart:*:cursor:off- Raised by
- Charts
- Since
- 1.86.0
What happened
A host asked a chart to put its crosshair at an x, but the chart has no cursor: either cursor was never set, or the type it was set on has no axes to read one from. Nothing moved, and it was said rather than returning quietly.
The fix
Set cursor: true (or the object form) on a cartesian chart before calling chart.cursor.set().
The smallest fix
createChart({ grid, container, type: 'line', x: 'day', y: 'price', cursor: true }).cursor.set('Tue');
Reference
Covered in full at the API reference.