MCPcopy Create free account
hub / github.com/apache/echarts / quantile

Function quantile

test/lib/ecSimpleTransform.js:36–42  ·  view source on GitHub ↗
(ascArr, p)

Source from the content-addressed store, hash-verified

34 return own.hasOwnProperty(prop);
35 }
36 function quantile(ascArr, p) {
37 var H = (ascArr.length - 1) * p + 1;
38 var h = Math.floor(H);
39 var v = +ascArr[h - 1];
40 var e = H - h;
41 return e ? v + e * (ascArr[h] - v) : v;
42 }
43
44 var METHOD_INTERNAL = {
45 'SUM': true,

Callers 1

lineCreatorForQFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected