Charts ยท console.warn
chart "scheme" was given as a name map toget...
Printed by Charts, prefixed [lattice], since 1.71.2.
Warnings reference › chart:scheme:array-and-map
- Identifier
chart:scheme:array-and-map- Raised by
- Charts
- Since
- 1.71.2
What happened
A scheme name map and an array palette are two different ways of choosing a chart's colours, and only one can be read. Given both, the map is treated as the caller's intent and the array is dropped, because a map names an explicit colour per category or series while an array only orders them - the more specific instruction wins.
The fix
Pass either a scheme name map ({ [name]: colour }) or a palette array, not both.
The smallest fix
createChart({ grid, container, type: 'donut', x: 'status', y: 'count', scheme: { Operational: 'green', Offline: 'red' } });
Reference
Covered in full at the API reference.