Interface: DoughnutController

Hierarchy

Properties

_cachedMeta

Readonly _cachedMeta: ChartMeta<Element<Object, Object>, Element<Object, Object>>

Inherited from

DatasetController._cachedMeta

Defined in

index.esm.d.ts:550DoughnutController - 图1 (opens new window)


chart

Readonly chart: Chart<"bar" | "line" | "scatter" | "bubble" | "pie" | "doughnut" | "polarArea" | "radar", (number | ScatterDataPoint | BubbleDataPoint)[], unknown>

Inherited from

DatasetController.chart

Defined in

index.esm.d.ts:548DoughnutController - 图2 (opens new window)


enableOptionSharing

enableOptionSharing: boolean

Inherited from

DatasetController.enableOptionSharing

Defined in

index.esm.d.ts:551DoughnutController - 图3 (opens new window)


index

Readonly index: number

Inherited from

DatasetController.index

Defined in

index.esm.d.ts:549DoughnutController - 图4 (opens new window)


innerRadius

Readonly innerRadius: number

Defined in

index.esm.d.ts:316DoughnutController - 图5 (opens new window)


offsetX

Readonly offsetX: number

Defined in

index.esm.d.ts:318DoughnutController - 图6 (opens new window)


offsetY

Readonly offsetY: number

Defined in

index.esm.d.ts:319DoughnutController - 图7 (opens new window)


outerRadius

Readonly outerRadius: number

Defined in

index.esm.d.ts:317DoughnutController - 图8 (opens new window)

Methods

addElements

addElements(): void

Returns

void

Inherited from

DatasetController.addElements

Defined in

index.esm.d.ts:567DoughnutController - 图9 (opens new window)


applyStack

Protected applyStack(scale, parsed): number

Parameters

NameType
scaleScale<CoreScaleOptions>
parsedunknown[]

Returns

number

Inherited from

DatasetController.applyStack

Defined in

index.esm.d.ts:603DoughnutController - 图10 (opens new window)


buildOrUpdateElements

buildOrUpdateElements(resetNewElements?): void

Parameters

NameType
resetNewElements?boolean

Returns

void

Inherited from

DatasetController.buildOrUpdateElements

Defined in

index.esm.d.ts:568DoughnutController - 图11 (opens new window)


calculateCircumference

calculateCircumference(value): number

Parameters

NameType
valuenumber

Returns

number

Defined in

index.esm.d.ts:322DoughnutController - 图12 (opens new window)


calculateTotal

calculateTotal(): number

Returns

number

Defined in

index.esm.d.ts:321DoughnutController - 图13 (opens new window)


configure

configure(): void

Returns

void

Inherited from

DatasetController.configure

Defined in

index.esm.d.ts:565DoughnutController - 图14 (opens new window)


draw

draw(): void

Returns

void

Inherited from

DatasetController.draw

Defined in

index.esm.d.ts:560DoughnutController - 图15 (opens new window)


getAllParsedValues

getAllParsedValues(scale): number[]

Parameters

NameType
scaleScale<CoreScaleOptions>

Returns

number[]

Inherited from

DatasetController.getAllParsedValues

Defined in

index.esm.d.ts:554DoughnutController - 图16 (opens new window)


getDataset

getDataset(): ChartDataset<"bar" | "line" | "scatter" | "bubble" | "pie" | "doughnut" | "polarArea" | "radar", (number | ScatterDataPoint | BubbleDataPoint)[]>

Returns

ChartDataset<"bar" | "line" | "scatter" | "bubble" | "pie" | "doughnut" | "polarArea" | "radar", (number | ScatterDataPoint | BubbleDataPoint)[]>

Inherited from

DatasetController.getDataset

Defined in

index.esm.d.ts:562DoughnutController - 图17 (opens new window)


getLabelAndValue

Protected getLabelAndValue(index): Object

Parameters

NameType
indexnumber

Returns

Object

NameType
labelstring
valuestring

Inherited from

DatasetController.getLabelAndValue

Defined in

index.esm.d.ts:555DoughnutController - 图18 (opens new window)


getMaxOverflow

Protected getMaxOverflow(): number | boolean

Returns

number | boolean

Inherited from

DatasetController.getMaxOverflow

Defined in

index.esm.d.ts:559DoughnutController - 图19 (opens new window)


getMeta

getMeta(): ChartMeta<Element<Object, Object>, Element<Object, Object>>

Returns

ChartMeta<Element<Object, Object>, Element<Object, Object>>

Inherited from

DatasetController.getMeta

Defined in

index.esm.d.ts:563DoughnutController - 图20 (opens new window)


getMinMax

Protected getMinMax(scale, canStack?): Object

Parameters

NameType
scaleScale<CoreScaleOptions>
canStack?boolean

Returns

Object

NameType
maxnumber
minnumber

Inherited from

DatasetController.getMinMax

Defined in

index.esm.d.ts:610DoughnutController - 图21 (opens new window)


getParsed

Protected getParsed(index): number | BarParsedData | CartesianParsedData | BubbleParsedData | RadialParsedData

Parameters

NameType
indexnumber

Returns

number | BarParsedData | CartesianParsedData | BubbleParsedData | RadialParsedData

Inherited from

DatasetController.getParsed

Defined in

index.esm.d.ts:602DoughnutController - 图22 (opens new window)


getScaleForId

getScaleForId(scaleID): Scale<CoreScaleOptions>

Parameters

NameType
scaleIDstring

Returns

Scale<CoreScaleOptions>

Inherited from

DatasetController.getScaleForId

Defined in

index.esm.d.ts:564DoughnutController - 图23 (opens new window)


getSharedOptions

Protected getSharedOptions(options): Record<string, unknown>

Utility for checking if the options are shared and should be animated separately.

Parameters

NameType
optionsRecord<string, unknown>

Returns

Record<string, unknown>

Inherited from

DatasetController.getSharedOptions

Defined in

index.esm.d.ts:577DoughnutController - 图24 (opens new window)


getStyle

getStyle(index, active): Record<string, unknown>

Parameters

NameType
indexnumber
activeboolean

Returns

Record<string, unknown>

Inherited from

DatasetController.getStyle

Defined in

index.esm.d.ts:570DoughnutController - 图25 (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”
sharedOptionsRecord<string, unknown>

Returns

boolean

Inherited from

DatasetController.includeOptions

Defined in

index.esm.d.ts:582DoughnutController - 图26 (opens new window)


initialize

initialize(): void

Returns

void

Inherited from

DatasetController.initialize

Defined in

index.esm.d.ts:566DoughnutController - 图27 (opens new window)


linkScales

linkScales(): void

Returns

void

Inherited from

DatasetController.linkScales

Defined in

index.esm.d.ts:553DoughnutController - 图28 (opens new window)


parse

parse(start, count): void

Parameters

NameType
startnumber
countnumber

Returns

void

Inherited from

DatasetController.parse

Defined in

index.esm.d.ts:598DoughnutController - 图29 (opens new window)


parseArrayData

Protected parseArrayData(meta, data, start, count): Record<string, unknown>[]

Parameters

NameType
metaChartMeta<Element<Object, Object>, Element<Object, Object>>
dataRecord<string, unknown>[]
startnumber
countnumber

Returns

Record<string, unknown>[]

Inherited from

DatasetController.parseArrayData

Defined in

index.esm.d.ts:600DoughnutController - 图30 (opens new window)


parseObjectData

Protected parseObjectData(meta, data, start, count): Record<string, unknown>[]

Parameters

NameType
metaChartMeta<Element<Object, Object>, Element<Object, Object>>
dataRecord<string, unknown>[]
startnumber
countnumber

Returns

Record<string, unknown>[]

Inherited from

DatasetController.parseObjectData

Defined in

index.esm.d.ts:601DoughnutController - 图31 (opens new window)


parsePrimitiveData

Protected parsePrimitiveData(meta, data, start, count): Record<string, unknown>[]

Parameters

NameType
metaChartMeta<Element<Object, Object>, Element<Object, Object>>
dataRecord<string, unknown>[]
startnumber
countnumber

Returns

Record<string, unknown>[]

Inherited from

DatasetController.parsePrimitiveData

Defined in

index.esm.d.ts:599DoughnutController - 图32 (opens new window)


removeHoverStyle

removeHoverStyle(element, datasetIndex, index): void

Parameters

NameType
elementElement<Object, Object>
datasetIndexnumber
indexnumber

Returns

void

Inherited from

DatasetController.removeHoverStyle

Defined in

index.esm.d.ts:595DoughnutController - 图33 (opens new window)


reset

reset(): void

Returns

void

Inherited from

DatasetController.reset

Defined in

index.esm.d.ts:561DoughnutController - 图34 (opens new window)


resolveDataElementOptions

Protected resolveDataElementOptions(index, mode): Record<string, unknown>

Parameters

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

Returns

Record<string, unknown>

Inherited from

DatasetController.resolveDataElementOptions

Defined in

index.esm.d.ts:572DoughnutController - 图35 (opens new window)


resolveDatasetElementOptions

Protected resolveDatasetElementOptions(mode): Record<string, unknown>

Parameters

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

Returns

Record<string, unknown>

Inherited from

DatasetController.resolveDatasetElementOptions

Defined in

index.esm.d.ts:571DoughnutController - 图36 (opens new window)


setHoverStyle

setHoverStyle(element, datasetIndex, index): void

Parameters

NameType
elementElement<Object, Object>
datasetIndexnumber
indexnumber

Returns

void

Inherited from

DatasetController.setHoverStyle

Defined in

index.esm.d.ts:596DoughnutController - 图37 (opens new window)


update

update(mode): void

Parameters

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

Returns

void

Inherited from

DatasetController.update

Defined in

index.esm.d.ts:557DoughnutController - 图38 (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
elementElement<Object, Object>
indexnumber
propertiesRecord<string, unknown>
mode“resize” | “reset” | “none” | “hide” | “show” | “normal” | “active”

Returns

void

Inherited from

DatasetController.updateElement

Defined in

index.esm.d.ts:588DoughnutController - 图39 (opens new window)


updateElements

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

Parameters

NameType
elementsElement<Object, Object>[]
startnumber
countnumber
mode“resize” | “reset” | “none” | “hide” | “show” | “normal” | “active”

Returns

void

Inherited from

DatasetController.updateElements

Defined in

index.esm.d.ts:556DoughnutController - 图40 (opens new window)


updateIndex

updateIndex(datasetIndex): void

Parameters

NameType
datasetIndexnumber

Returns

void

Inherited from

DatasetController.updateIndex

Defined in

index.esm.d.ts:558DoughnutController - 图41 (opens new window)


updateRangeFromParsed

Protected updateRangeFromParsed(range, scale, parsed, stack): void

Parameters

NameType
rangeObject
range.maxnumber
range.minnumber
scaleScale<CoreScaleOptions>
parsedunknown[]
stackstring | boolean

Returns

void

Inherited from

DatasetController.updateRangeFromParsed

Defined in

index.esm.d.ts:604DoughnutController - 图42 (opens new window)


updateSharedOptions

Protected updateSharedOptions(sharedOptions, mode, newOptions): void

Utility to animate the shared options, that are potentially affecting multiple elements.

Parameters

NameType
sharedOptionsRecord<string, unknown>
mode“resize” | “reset” | “none” | “hide” | “show” | “normal” | “active”
newOptionsRecord<string, unknown>

Returns

void

Inherited from

DatasetController.updateSharedOptions

Defined in

index.esm.d.ts:594DoughnutController - 图43 (opens new window)