Class: DatasetController<TType, TElement, TDatasetElement, TParsedData>

    new DatasetController<TType, TElement, TDatasetElement, TParsedData>(chart, datasetIndex)

    Type parameters

    NameType
    TTypeextends keyof keyof ChartTypeRegistry
    TElementextends <AnyObject, AnyObject, TElement>Element<AnyObject, AnyObject>
    TDatasetElementextends <AnyObject, AnyObject, TDatasetElement>Element<AnyObject, AnyObject>
    TParsedData<TType>

    Parameters

    NameType
    chart<keyof ChartTypeRegistry, (number | | BubbleDataPoint)[], unknown>
    datasetIndexnumber

    Defined in

    index.esm.d.ts:572 (opens new window)

    _cachedMeta

    Readonly _cachedMeta: ChartMeta<TElement, TDatasetElement, TType>

    Defined in

    index.esm.d.ts:576DatasetController - 图2 (opens new window)


    chart

    Readonly chart: Chart<keyof , (number | ScatterDataPoint | )[], unknown>

    Defined in


    enableOptionSharing

    enableOptionSharing: boolean

    Defined in

    index.esm.d.ts:577DatasetController - 图4 (opens new window)


    index

    Readonly index: number

    Defined in

    addElements

    addElements(): void

    Returns

    void

    Defined in


    applyStack

    Protected applyStack(scale, parsed): number

    Parameters

    NameType
    scaleScale<>
    parsedunknown[]

    Returns

    number

    Defined in

    index.esm.d.ts:629 (opens new window)


    buildOrUpdateElements

    buildOrUpdateElements(resetNewElements?): void

    Parameters

    NameType
    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

    NameType
    scaleScale<>

    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:588DatasetController - 图12 (opens new window)


    Protected getLabelAndValue(index): Object

    Parameters

    NameType
    indexnumber

    Returns

    Object

    NameType
    labelstring
    valuestring

    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

    NameType
    scaleScale<>
    canStack?boolean

    Returns

    Object

    Defined in

    index.esm.d.ts:636 (opens new window)


    getParsed

    Protected getParsed(index): TParsedData

    Parameters

    NameType
    indexnumber

    Returns

    TParsedData

    Defined in


    getScaleForId

    getScaleForId(scaleID): <CoreScaleOptions>

    Parameters

    NameType
    scaleIDstring

    Returns

    <CoreScaleOptions>

    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

    NameType
    optionsAnyObject

    Returns

    AnyObject

    Defined in


    getStyle

    getStyle(index, ): AnyObject

    Parameters

    NameType
    indexnumber
    activeboolean

    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

    NameType
    mode“resize” | “reset” | “none” | “hide” | “show” | “normal” | “active”
    sharedOptionsAnyObject

    Returns

    boolean

    Defined in


    initialize

    initialize(): void

    Returns

    void

    Defined in


    linkScales

    linkScales(): void

    Returns

    void

    Defined in


    parse

    parse(start, count): void

    Parameters

    NameType
    startnumber
    countnumber

    Returns

    void

    Defined in

    index.esm.d.ts:624 (opens new window)


    Protected parseArrayData(meta, data, start, count): AnyObject[]

    Parameters

    NameType
    metaChartMeta<TElement, TDatasetElement, TType>
    dataAnyObject[]
    startnumber
    countnumber

    Returns

    AnyObject[]

    Defined in


    parseObjectData

    Protected parseObjectData(meta, data, start, count): AnyObject[]

    Parameters

    NameType
    metaChartMeta<TElement, TDatasetElement, TType>
    dataAnyObject[]
    startnumber
    countnumber

    Returns

    AnyObject[]

    Defined in


    parsePrimitiveData

    Protected parsePrimitiveData(meta, data, start, count): AnyObject[]

    Parameters

    Returns

    AnyObject[]

    Defined in


    removeHoverStyle

    removeHoverStyle(element, datasetIndex, index): void

    Parameters

    NameType
    elementTElement
    datasetIndexnumber
    indexnumber

    Returns

    void

    Defined in

    index.esm.d.ts:621DatasetController - 图28 (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

    NameType
    indexnumber
    mode“resize” | “reset” | “none” | “hide” | “show” | “normal” | “active”

    Returns

    AnyObject

    Defined in


    resolveDatasetElementOptions

    Protected resolveDatasetElementOptions(mode):

    Parameters

    NameType
    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

    NameType
    elementTElement
    datasetIndexnumber
    indexnumber

    Returns

    void

    Defined in


    update

    update(mode): void

    Parameters

    NameType
    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

    NameType
    elementTElement | TDatasetElement
    indexnumber
    propertiesAnyObject
    mode“resize” | “reset” | “none” | “hide” | “show” | “normal” | “active”

    Returns

    void

    Defined in


    updateElements

    updateElements(elements, start, count, mode): void

    Parameters

    NameType
    elementsTElement[]
    startnumber
    countnumber
    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

    NameType
    datasetIndexnumber

    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

    NameType
    sharedOptionsAnyObject
    mode“resize” | “reset” | “none” | “hide” | “show” | “normal” | “active”
    newOptionsAnyObject

    Returns

    void

    Defined in