Documentation / @ripl/charts / cumulativeExtent
Function: cumulativeExtent() ​
cumulativeExtent<
TSeries,TData>(series,data,getValue): [number,number]
Defined in: charts/src/core/data.ts:187
Computes the value extent [min, max] of the running cumulative total across series: the span a stacked area chart covers as each series accumulates on top of the previous ones. Both bounds seed at 0, so a single-sign dataset keeps a zero baseline.
Type Parameters ​
| Type Parameter | Description |
|---|---|
TSeries | The series type. |
TData | The data-item type. |
Parameters ​
| Parameter | Type | Description |
|---|---|---|
series | TSeries[] | The series that stack together, in stacking order. |
data | TData[] | The dataset iterated per item. |
getValue | (series, item) => number | Resolves a series' numeric value at a data item. |
Returns ​
[number, number]
The [min, max] extent covering the cumulative running total across every item.