Skip to content

Function: ecdfValues() ​

ts
function ecdfValues(base, weights, norm?, mode?): object;

The ECDF of one group, as px computes it: rows sorted by their base value (descending for 'reversed'), the running sum of the weights (1 per row without a weight column), subtracted from the total for 'complementary', and divided by the total for 'probability' (× 100 for 'percent'). Rows with a missing base value are skipped; missing weights count as 0.

Parameters ​

ParameterTypeDefault value
basereadonly unknown[]undefined
weightsreadonly unknown[] | undefinedundefined
normEcdfNorm'probability'
modeEcdfMode'standard'

Returns ​

object

The rows in plotting order (ascending base value) and their cumulative values.

NameType
ordernumber[]
valuesnumber[]

Released under the MIT License.