Class Tee.Data.Dimension
Class to represent a Dimension of data.
Defined in: <..\..\src\teechart-data.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
Tee.Data.Dimension(title, field, id)
|
Method Attributes | Method Name and Description |
---|---|
addDimension(title, field, id)
|
|
addLink(field, dimension, datasetField)
|
|
addMetric(title, name, measure)
|
|
addSubDimension(parent, title, field, id)
|
|
datePart(date)
|
|
get(id)
|
|
getIds()
|
|
getLinksTo(dimension)
|
|
hasParent(dimension)
|
|
inSelected(data)
|
|
isSelected(data)
|
|
search(link, data, inverted)
|
|
searchAcross(lin, o)
|
|
toggleSelected(series, index)
Selects or unselects a given series index point value.
|
|
traverse(process)
Traverses all items belonging to this dimension and calls the process function for each item.
|
|
<inner> |
trunc(value)
|
Method Detail
{Tee.Data.Dimension}
addDimension(title, field, id)
- Parameters:
- {String} title
- The string identifier for this dimension.
- {String} field
- The field string to obtain dimension child items.
- {String} id Optional, Default: ""
- The optional field string to obtain unique identifiers for dimension child items.
- Returns:
- {Tee.Data.Dimension} Creates and returns a new child dimension.
{object}
addLink(field, dimension, datasetField)
- Parameters:
- {String|Array} field
- The string field(s) identifier(s) for this origin dimension.
- {Tee.Data.Dimension} dimension
- The destination dimension.
- {String|Array} datasetField
- The string field(s) identifier(s) for the destination dimension.
- Returns:
- {object} Creates and returns a new link object that knows how to get from this origin dimension to destination {dimension} parameter.
{Tee.Data.Metric}
addMetric(title, name, measure)
- Parameters:
- {String} title
- The string identifier for this metric.
- {String} name
- The field string to obtain metric values from parent dimension items.
- {String} measure Optional, Default: "sum"
- The optional measure style for this metric.
- Returns:
- {Tee.Data.Metric} Creates and returns a new metric for this dimension.
addSubDimension(parent, title, field, id)
- Parameters:
- parent
- title
- field
- id
{boolean}
anySelected()
- Returns:
- {boolean} Returns true when selected filter is not empty.
{Number}
datePart(date)
- Parameters:
- {Date} date
- The Date value.
- Returns:
- {Number} Returns the currently selected part of {date} parameter.
{object}
get(id)
- Parameters:
- {object} id
- The identifier value to search for.
- Returns:
- {object} Search for an item with {id} as identifier and return it.
getIds()
getLinksTo(dimension)
- Parameters:
- dimension
getValues()
{boolean}
hasParent(dimension)
- Parameters:
- {Tee.Data.Dimension} dimension
- The dimension to test as parent.
- Returns:
- {boolean} Returns true when this dimension has {dimension} parameter as parent in the hierarchy.
{boolean}
inSelected(data)
- Parameters:
- {object} data
- The value to check for.
- Returns:
- {boolean} Returns true when data is a value of the current selected filter.
{boolean}
isSelected(data)
- Parameters:
- {object} data
- The value to search.
- Returns:
- {boolean} Returns true when {data} parameter is in the currently selected list.
search(link, data, inverted)
- Parameters:
- link
- data
- inverted
searchAcross(lin, o)
- Parameters:
- lin
- o
toggleSelected(series, index)
Selects or unselects a given series index point value.
- Parameters:
- {Tee.Series} series
- The series to toggle its index point format.
- index
traverse(process)
Traverses all items belonging to this dimension and calls the process function for each item.
- Parameters:
- {function} process
- The function that will get called for each item in the dimension.
<inner>
trunc(value)
- Parameters:
- value