An array of objects with key
and values
properties, as returned from d3.nest().entries()
The key
property to assign to the returned layer.
Optional
copyProperties: string[]An array of string property names to copy as-is from the first layer's data values.
Optional
sumProperties: string[]An array of string property names to add together from all layer data.
Optional
staticProperties: 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
Generated using TypeDoc
Combine the layers resulting from a
d3.nest
operation 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
layerData
parameter, with just a single layer of data.For example:
Then
result
would look like this: