Class: Categorical

Categorical(name, data, schema)

Represents categorical field subtype.

Constructor

new Categorical(name, data, schema)

Creates new Categorical field instance.
Parameters:
Name Type Description
name string The name of the field.
data Array An array containing the field data.
schema Object The schema for the field.
Source:

Extends

Methods

domain() → {Array}

Returns the domain for the dimension field.
Inherited From:
Source:
Returns:
Returns the unique values from dimension values.
Type
Array

parse(val) → {string}

A hook which is called for every entry(cell) of the column.
Parameters:
Name Type Description
val * The current entry present in the column while iteration.
Inherited From:
Source:
To Do:
  • Fix the null data e.g. undefined or null etc.
Returns:
Returns the string representation of the value.
Type
string

parsed(val) → {string}

Saves the cardinality of the dimensional values after parsing the data.
Parameters:
Name Type Description
val string The parsed value.
Inherited From:
Source:
Returns:
Returns the input val.
Type
string

subType() → {string}

Getter for subType value of the field.
Source:
Returns:
Returns subType of the field.
Type
string