Class: Dimension

Dimension()

Represents dimension field type.

Constructor

new Dimension()

Source:

Extends

Methods

clone(data) → {PartialField}

Creates brand new copy of current field instance. To avoid optimization issue pass the required data otherwise current data would be copied which might be expensive.
Parameters:
Name Type Description
data Array The input data, if provided current data will not be cloned.
Inherited From:
Source:
Returns:
Returns the cloned field instance.
Type
PartialField

description() → {description}

Inherited From:
Source:
Returns:
Name of the field
Type
description

domain()

Generates and returns the domain for the field.
Overrides:
Source:

fieldName() → {string}

Inherited From:
Source:
Returns:
Name of the field
Type
string

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.
Overrides:
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.
Overrides:
Source:
Returns:
Returns the input val.
Type
string

sanitize() → {PartialField}

Sanitizes the field data.
Inherited From:
Source:
Returns:
- Returns the instance of the current context for chaining.
Type
PartialField

type() → {string}

Inherited From:
Source:
Returns:
Type of the field
Type
string