Lattice Grid Buy a licence

Charts ยท console.warn

a drawn chart annotation of kind {kind} was ...

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

Warnings reference › chart:annotate:anchors:*

Identifier
chart:annotate:anchors:*
Raised by
Charts
Since
1.72.0

What happened

A drawing in a state handed to chart.setState() had fewer data anchors than its kind is defined by - a trend line with one end, a channel with no offset. Inventing the missing anchor would put a line on the chart nobody drew, so the drawing was dropped.

The fix

Give each drawing the anchors its kind needs: one for horizontalLine, verticalLine, text and note; two for trendLine, arrow, fibonacci and callout; three for channel. Each anchor is { x, y } in the chart's own data coordinates.

The smallest fix

chart.setState({ annotations: [{ kind: 'trendLine', anchors: [{ x: 1, y: 15 }, { x: 4, y: 30 }] }] });

Reference

Covered in full at the API reference.