Lattice Grid Buy a licence

The grid (rendering) ยท console.warn

createMeter needs a `container`: an element ...

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

Warnings reference › meter.container

Identifier
meter.container
Raised by
The grid (rendering)
Since
1.111.0

What happened

createMeter() had no element to draw into. It returns an inert handle - refresh(), update(), value() and destroy() all work and do nothing - so calling code is safe and nothing appears on screen.

The fix

Pass container as an element or a selector that resolves to one.

The smallest fix

createMeter({ container: '#capacity', label: 'Capacity', value: 30 });

Reference

Covered in full at the API reference.