Skip to content

charton API


charton API / @chart-on/core / index / valueArea

Function: valueArea() ​

valueArea(volume, rows, poc, percent?): RowRange

Defined in: packages/core/src/profile/math.ts:275

Smallest row range around the point of control holding at least percent of the total volume. Starting from the POC, it repeatedly adds whichever neighbouring row (above or below) has more volume; when both have the same volume it adds both. Returns -1 bounds when poc is not a valid row.

Parameters ​

volume ​

ArrayLike<number>

rows ​

number

poc ​

number

percent? ​

number = 70

Returns ​

RowRange