Skip to content

Function: top() ​

ts
function top<F>(
   field, 
   n, 
   otherLabel?
): CategorySpec<F>;

Defined in: packages/core/src/specs.ts:41

A categorical dimension that keeps the n most frequent values and groups the rest.

Type Parameters ​

Type Parameter
F extends string

Parameters ​

ParameterTypeDefault value
fieldFundefined
nnumberundefined
otherLabel?string"Other"

Returns ​

CategorySpec<F>

Released under the MIT License.