Lattice Grid Buy a licence

The grid (rendering) ยท console.warn

annotate.add ignored a mark: it needs a known `type` ({types}) and at least two finite {x, y} points in content coordinates.

Printed by The grid (rendering), prefixed [lattice], since 1.30.0.

Warnings referenceannotate.add.invalid

Identifier
annotate.add.invalid
Raised by
The grid (rendering)
Since
1.30.0

What happened

A host-added annotation mark could not be built from its descriptor, so nothing was added to the layer and the call returns the mark count unchanged. Either the type is not one the layer draws, or the points array has fewer than two usable points - a point with a NaN, a string coordinate or a missing axis does not count.

The fix

Use one of the listed types and give at least two points in content coordinates (the same space the grid scrolls in, not screen pixels).

The smallest fix

grid.annotate.add({ type: 'line', points: [{ x: 10, y: 20 }, { x: 240, y: 90 }] });

Reference

Covered in full at the API reference.