Class: DatasetController<TType, TElement, TDatasetElement, TParsedData>
• new DatasetController<TType
, TElement
, TDatasetElement
, TParsedData
>(chart
, datasetIndex
)
Type parameters
Name | Type |
---|---|
TType | extends keyof keyof ChartTypeRegistry |
TElement | extends <AnyObject , AnyObject , TElement >Element<AnyObject , AnyObject > |
TDatasetElement | extends <AnyObject , AnyObject , TDatasetElement >Element<AnyObject , AnyObject > |
TParsedData | <TType > |
Parameters
Name | Type |
---|---|
chart | <keyof ChartTypeRegistry, (number | | BubbleDataPoint)[], unknown > |
datasetIndex | number |
Defined in
index.esm.d.ts:572 (opens new window)
_cachedMeta
• Readonly
_cachedMeta: ChartMeta<TElement
, TDatasetElement
, TType
>
Defined in
index.esm.d.ts:576 (opens new window)
chart
• Readonly
chart: Chart<keyof , (number
| ScatterDataPoint | )[], unknown
>
Defined in
enableOptionSharing
• enableOptionSharing: boolean
Defined in
index.esm.d.ts:577 (opens new window)
index
• Readonly
index: number
Defined in
addElements
▸ addElements(): void
Returns
void
Defined in
applyStack
▸ Protected
applyStack(scale
, parsed
): number
Parameters
Name | Type |
---|---|
scale | Scale<> |
parsed | unknown [] |
Returns
number
Defined in
index.esm.d.ts:629 (opens new window)
buildOrUpdateElements
▸ buildOrUpdateElements(resetNewElements?
): void
Parameters
Name | Type |
---|---|
resetNewElements? | boolean |
Returns
void
Defined in
configure
▸ configure(): void
Returns
void
Defined in
draw
▸ draw(): void
Returns
void
Defined in
getAllParsedValues
▸ getAllParsedValues(scale
): number
[]
Parameters
Name | Type |
---|---|
scale | Scale<> |
Returns
number
[]
Defined in
index.esm.d.ts:580 (opens new window)
getDataset
▸ getDataset(): ChartDataset<keyof , (number
| ScatterDataPoint | )[]>
Returns
<keyof ChartTypeRegistry, (number
| | BubbleDataPoint)[]>
Defined in
index.esm.d.ts:588 (opens new window)
▸ Protected
getLabelAndValue(index
): Object
Parameters
Name | Type |
---|---|
index | number |
Returns
Object
Name | Type |
---|---|
label | string |
value | string |
Defined in
index.esm.d.ts:581 (opens new window)
getMaxOverflow
▸ Protected
getMaxOverflow(): number
| boolean
Returns
number
| boolean
Defined in
getMeta
▸ getMeta(): <TElement
, TDatasetElement
, TType
>
Returns
<TElement
, TDatasetElement
, TType
>
Defined in
getMinMax
▸ Protected
getMinMax(scale
, canStack?
): Object
Parameters
Name | Type |
---|---|
scale | Scale<> |
canStack? | boolean |
Returns
Object
Defined in
index.esm.d.ts:636 (opens new window)
getParsed
▸ Protected
getParsed(index
): TParsedData
Parameters
Name | Type |
---|---|
index | number |
Returns
TParsedData
Defined in
getScaleForId
▸ getScaleForId(scaleID
): <CoreScaleOptions>
Parameters
Name | Type |
---|---|
scaleID | string |
Returns
Defined in
index.esm.d.ts:590 (opens new window)
getSharedOptions
▸ Protected
getSharedOptions(options
): AnyObject
Utility for checking if the options are shared and should be animated separately.
Parameters
Name | Type |
---|---|
options | AnyObject |
Returns
AnyObject
Defined in
getStyle
▸ getStyle(index
, ): AnyObject
Parameters
Name | Type |
---|---|
index | number |
active | boolean |
Returns
AnyObject
Defined in
index.esm.d.ts:596 (opens new window)
includeOptions
▸ Protected
includeOptions(mode
, sharedOptions
): boolean
Utility for determining if options
should be included in the updated properties
Parameters
Name | Type |
---|---|
mode | “resize” | “reset” | “none” | “hide” | “show” | “normal” | “active” |
sharedOptions | AnyObject |
Returns
boolean
Defined in
initialize
▸ initialize(): void
Returns
void
Defined in
linkScales
▸ linkScales(): void
Returns
void
Defined in
parse
▸ parse(start
, count
): void
Parameters
Name | Type |
---|---|
start | number |
count | number |
Returns
void
Defined in
index.esm.d.ts:624 (opens new window)
▸ Protected
parseArrayData(meta
, data
, start
, count
): AnyObject
[]
Parameters
Name | Type |
---|---|
meta | ChartMeta<TElement , TDatasetElement , TType > |
data | AnyObject [] |
start | number |
count | number |
Returns
AnyObject
[]
Defined in
parseObjectData
▸ Protected
parseObjectData(meta
, data
, start
, count
): AnyObject
[]
Parameters
Name | Type |
---|---|
meta | ChartMeta<TElement , TDatasetElement , TType > |
data | AnyObject [] |
start | number |
count | number |
Returns
AnyObject
[]
Defined in
parsePrimitiveData
▸ Protected
parsePrimitiveData(meta
, data
, start
, count
): AnyObject
[]
Parameters
Returns
AnyObject
[]
Defined in
removeHoverStyle
▸ removeHoverStyle(element
, datasetIndex
, index
): void
Parameters
Name | Type |
---|---|
element | TElement |
datasetIndex | number |
index | number |
Returns
void
Defined in
index.esm.d.ts:621 (opens new window)
reset
▸ reset(): void
Returns
void
Defined in
index.esm.d.ts:587 (opens new window)
resolveDataElementOptions
▸ Protected
resolveDataElementOptions(index
, mode
): AnyObject
Parameters
Name | Type |
---|---|
index | number |
mode | “resize” | “reset” | “none” | “hide” | “show” | “normal” | “active” |
Returns
AnyObject
Defined in
resolveDatasetElementOptions
▸ Protected
resolveDatasetElementOptions(mode
):
Parameters
Name | Type |
---|---|
mode | “resize” | “reset” | “none” | “hide” | “show” | “normal” | “active” |
Returns
AnyObject
Defined in
index.esm.d.ts:597 (opens new window)
setHoverStyle
▸ setHoverStyle(element
, datasetIndex
, index
): void
Parameters
Name | Type |
---|---|
element | TElement |
datasetIndex | number |
index | number |
Returns
void
Defined in
update
▸ update(mode
): void
Parameters
Name | Type |
---|---|
mode | “resize” | “reset” | “none” | “hide” | “show” | “normal” | “active” |
Returns
void
Defined in
index.esm.d.ts:583 (opens new window)
updateElement
▸ Protected
updateElement(element
, index
, properties
, mode
): void
Utility for updating an element with new properties, using animations when appropriate.
Parameters
Name | Type |
---|---|
element | TElement | TDatasetElement |
index | number |
properties | AnyObject |
mode | “resize” | “reset” | “none” | “hide” | “show” | “normal” | “active” |
Returns
void
Defined in
updateElements
▸ updateElements(elements
, start
, count
, mode
): void
Parameters
Name | Type |
---|---|
elements | TElement [] |
start | number |
count | number |
mode | “resize” | “reset” | “none” | “hide” | “show” | “normal” | “active” |
Returns
void
Defined in
index.esm.d.ts:582 (opens new window)
updateIndex
▸ updateIndex(datasetIndex
): void
Parameters
Name | Type |
---|---|
datasetIndex | number |
Returns
void
Defined in
▸ Protected
updateRangeFromParsed(range
, scale
, parsed
, stack
): void
Parameters
Returns
void
Defined in
updateSharedOptions
▸ Protected
updateSharedOptions(sharedOptions
, mode
, newOptions
): void
Utility to animate the shared options, that are potentially affecting multiple elements.
Parameters
Name | Type |
---|---|
sharedOptions | AnyObject |
mode | “resize” | “reset” | “none” | “hide” | “show” | “normal” | “active” |
newOptions | AnyObject |
Returns
void