Lattice Grid Buy a licence

Charts ยท console.warn

chart "x" expects one column id (a string) and was given an array [{ids}]. A chart takes one category column on "x". For a hierarchy, group the grid - grid.columns.group([...]) - and the hierarchical types (pie, donut, sunburst, treemap) read the grouping.

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

Warnings referencechart:*:x:array

Identifier
chart:*:x:array
Raised by
Charts
Since
1.55.0

What happened

x was an array. It is the shape a reader guesses for "nest by these two", and the chart has no such reading: the array reaches the grid's column lookup, which takes one id, so nothing resolves and the chart draws empty. The diagnostic is raised per chart and before the binding, so it precedes whatever the binding then makes of it.

The fix

Give x one column id. For a hierarchy, group the grid and use a hierarchical type, which reads the grouping rather than a list of columns.

The smallest fix

grid.columns.group(['region', 'product']);
createChart({ grid, container, type: 'sunburst' });

Reference

Covered in full at the API reference.