An array of objects with key and values properties, as returned from d3.nest().entries()
The key property to assign to the returned layer.
OptionalcopyProperties: string[]An array of string property names to copy as-is from the first layer's data values.
OptionalsumProperties: string[]An array of string property names to add together from all layer data.
OptionalstaticProperties: Record<string, any>Static properties to copy as-is to all output data values.
An array of objects with key and value properties, the same structure as the provided layerData argument
Combine the layers resulting from a
d3.nestoperation into a single, aggregated layer.This can be used to combine all sources of a single data type, for example to show all "power" sources as a single layer of chart data. The resulting object has the same structure as the input
layerDataparameter, with just a single layer of data.For example:
Then
resultwould look like this: