Immutably appends a data point to a layer of a Maidr config.
Supports flat point arrays (bar, histogram, scatter, candlestick, box) and
nested group arrays (line, smooth, segmented, violin) via groupIndex.
For nested layers, a groupIndex equal to the current group count creates
a new group, which also makes appending into an initially empty layer
(data: []) work. Heatmap layers (object data) are not supported.
The returned config shares all untouched structures with the input; the
input is never mutated.
Immutably appends a data point to a layer of a Maidr config.
Supports flat point arrays (bar, histogram, scatter, candlestick, box) and nested group arrays (line, smooth, segmented, violin) via
groupIndex. For nested layers, agroupIndexequal to the current group count creates a new group, which also makes appending into an initially empty layer (data: []) work. Heatmap layers (object data) are not supported.The returned config shares all untouched structures with the input; the input is never mutated.