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. Facet
s.
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.
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.
Type:
-
string
(static) categorialTransform :CategorialTransform
A categorial transformation to apply to the data
Type:
(static) continuousTransform :ContinuousTransform
A continuous transformation to apply to the data
Type:
(static) datetimeTransform :dateimeTransform
A datetime transformation to apply to the data
Type:
-
dateimeTransform
(static) description :string
Description of this facet, for displaying purposes
Type:
-
string
(static) durationTransform :dateimeTransform
A duration transformation to apply to the data
Type:
-
dateimeTransform
(static, readonly) maxval :number|datetime
For continuous or datetime Facets, the maximum value.
Type:
-
number
|datetime
(static) maxvalAsText :string
For continuous or datetime Facets, the maximum value as text.
Parsed value available in the maxval
property
Type:
-
string
(static, readonly) minval :number|datetime
For continuous or datetime Facets, the minimum value.
Type:
-
number
|datetime
(static) minvalAsText :string
For continuous or datetime Facets, the minimum value as text.
Parsed value available in the minval
property
Type:
-
string
(static, readonly) misval :Array.<Object>
Array of missing data indicators
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.
Type:
-
string
(static) name :string
Short name for this facet, for displaying purposes
Type:
-
string
(static) show :boolean
Show in facet lists (used for interactive searching on Facets page)
Type:
-
boolean
(static) textTransform :TextTransform
A text transform
Type:
-
TextTransform
(static) type :string
Type of this facet:
constant
A constant value of "1" for all data itemscontinuous
The facet takes on real numberscategorial
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.
Type:
-
string
(static) units :string
For continuous facets, its units for displaying purposes
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.
(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.