Facet

Facet

new Facet()

Facets are the main abstraction over the data.

A Dataset is a collection of (similar) items, with each item having a certain set of properties, ie. Facets. The Facet class defines the property: It can be a continuous value, a set of labels or tags, or it can be result of some transformation or equation.

Source:

Extends

Members

(static) accessor :string

The accessor for this facet. For nested properties use dot notation: For a dataset [ {name: {first: "Santa", last: "Claus"}}, ...] you can use name.first and name.last to get Santa and Claus, respectively.

Source:
Type:
  • string

(static) categorialTransform :CategorialTransform

A categorial transformation to apply to the data

Source:
Type:

(static) continuousTransform :ContinuousTransform

A continuous transformation to apply to the data

Source:
Type:

(static) datetimeTransform :dateimeTransform

A datetime transformation to apply to the data

Source:
Type:
  • dateimeTransform

(static) description :string

Description of this facet, for displaying purposes

Source:
Type:
  • string

(static) durationTransform :dateimeTransform

A duration transformation to apply to the data

Source:
Type:
  • dateimeTransform

(static) isActive :boolean

Show facet bar (on Analyze page)

Source:
Type:
  • boolean

(static, readonly) maxval :number|datetime

For continuous or datetime Facets, the maximum value.

Source:
Type:
  • number | datetime

(static) maxvalAsText :string

For continuous or datetime Facets, the maximum value as text. Parsed value available in the maxval property

Source:
Type:
  • string

(static, readonly) minval :number|datetime

For continuous or datetime Facets, the minimum value.

Source:
Type:
  • number | datetime

(static) minvalAsText :string

For continuous or datetime Facets, the minimum value as text. Parsed value available in the minval property

Source:
Type:
  • string

(static, readonly) misval :Array.<Object>

Array of missing data indicators

Source:
Type:
  • Array.<Object>

(static) misvalAsText :string

Missing or invalid data indicator; for multiple values, use a comma separated, quoted list Numbers, strings, booleans, and the special value null are allowed. Use single or double quotes for strings "missing". The parsed values are available in the misval property.

Source:
Type:
  • string

(static) name :string

Short name for this facet, for displaying purposes

Source:
Type:
  • string

(static) show :boolean

Show in facet lists (used for interactive searching on Facets page)

Source:
Type:
  • boolean

(static) textTransform :TextTransform

A text transform

Source:
Type:
  • TextTransform

(static) type :string

Type of this facet:

  • constant A constant value of "1" for all data items
  • continuous The facet takes on real numbers
  • categorial The facet is a string, or an array of strings (for a well defined set of labels and tags)
  • datetime The facet is a datetime (using momentjs.tz)
  • duration The facet is a duration (using momentjs.duration)
  • text Freeform text. Check for facet type using isConstant, isContinuous, isCategorial, isDatetime, isDuration, or isText properties.
Source:
Type:
  • string

(static) units :string

For continuous facets, its units for displaying purposes

Source:
Type:
  • string

Methods

(static) setCategories()

setCategories finds finds all values on an ordinal (categorial) axis Updates the categorialTransform of the facet For facets in a dataview, this is the union of the categories of facet over all active datasets. For facets in a dataset, the actual implementation is in the dataset driver.

Source:

(static) setMinMax()

setMinMax sets the range of a continuous or time facet For facets in a dataview, the minimum is just the minimum of the facet over all active datasets, and the same for the maximum. For facets in a datset, the actual implementation is in the dataset driver.

Source: