Lattice Grid Buy a licence

The grid (rendering) ยท console.warn

`show` needs `fn: 'min'` or `fn: 'max'`: "{fn}" reduces to a value that no single row holds, so there is no row to report from.

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

Warnings referencestat.show.*

Identifier
stat.show.*
Raised by
The grid (rendering)
Since
1.10.0

What happened

show reports another column's value from the row that produced the extreme, which only means something for min and max. A sum or an average is not held by any one row, so there is no row to read show from and the stat answers null.

The fix

Use fn: 'min' or fn: 'max' with show, or drop show and report the aggregate itself.

The smallest fix

createStat({ grid, container, col: 'amount', fn: 'max', show: 'customer' });

Reference

Covered in full at the API reference.