# Interface: DoughnutController

# Hierarchy

# Properties

# _cachedMeta

Readonly _cachedMeta: ChartMeta<keyof ChartTypeRegistry, default<AnyObject, AnyObject>, default<AnyObject, AnyObject>>

# Inherited from

DatasetController._cachedMeta

# Defined in

types/index.d.ts:592


# chart

Readonly chart: Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>

# Inherited from

DatasetController.chart

# Defined in

types/index.d.ts:590


# enableOptionSharing

enableOptionSharing: boolean

# Inherited from

DatasetController.enableOptionSharing

# Defined in

types/index.d.ts:593


# index

Readonly index: number

# Inherited from

DatasetController.index

# Defined in

types/index.d.ts:591


# innerRadius

Readonly innerRadius: number

# Defined in

types/index.d.ts:341


# offsetX

Readonly offsetX: number

# Defined in

types/index.d.ts:343


# offsetY

Readonly offsetY: number

# Defined in

types/index.d.ts:344


# outerRadius

Readonly outerRadius: number

# Defined in

types/index.d.ts:342


# supportsDecimation

supportsDecimation: boolean

# Inherited from

DatasetController.supportsDecimation

# Defined in

types/index.d.ts:597

# Methods

# addElements

addElements(): void

# Returns

void

# Inherited from

DatasetController.addElements

# Defined in

types/index.d.ts:613


# applyStack

Protected applyStack(scale, parsed): number

# Parameters

Name Type
scale Scale<CoreScaleOptions>
parsed unknown[]

# Returns

number

# Inherited from

DatasetController.applyStack

# Defined in

types/index.d.ts:649


# buildOrUpdateElements

buildOrUpdateElements(resetNewElements?): void

# Parameters

Name Type
resetNewElements? boolean

# Returns

void

# Inherited from

DatasetController.buildOrUpdateElements

# Defined in

types/index.d.ts:614


# calculateCircumference

calculateCircumference(value): number

# Parameters

Name Type
value number

# Returns

number

# Defined in

types/index.d.ts:347


# calculateTotal

calculateTotal(): number

# Returns

number

# Defined in

types/index.d.ts:346


# configure

configure(): void

# Returns

void

# Inherited from

DatasetController.configure

# Defined in

types/index.d.ts:611


# draw

draw(): void

# Returns

void

# Inherited from

DatasetController.draw

# Defined in

types/index.d.ts:606


# getAllParsedValues

getAllParsedValues(scale): number[]

# Parameters

Name Type
scale Scale<CoreScaleOptions>

# Returns

number[]

# Inherited from

DatasetController.getAllParsedValues

# Defined in

types/index.d.ts:600


# getDataset

getDataset(): ChartDataset<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[]>

# Returns

ChartDataset<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[]>

# Inherited from

DatasetController.getDataset

# Defined in

types/index.d.ts:608


# getLabelAndValue

Protected getLabelAndValue(index): Object

# Parameters

Name Type
index number

# Returns

Object

Name Type
label string
value string

# Inherited from

DatasetController.getLabelAndValue

# Defined in

types/index.d.ts:601


# getMaxOverflow

Protected getMaxOverflow(): number | boolean

# Returns

number | boolean

# Inherited from

DatasetController.getMaxOverflow

# Defined in

types/index.d.ts:605


# getMeta

getMeta(): ChartMeta<keyof ChartTypeRegistry, default<AnyObject, AnyObject>, default<AnyObject, AnyObject>>

# Returns

ChartMeta<keyof ChartTypeRegistry, default<AnyObject, AnyObject>, default<AnyObject, AnyObject>>

# Inherited from

DatasetController.getMeta

# Defined in

types/index.d.ts:609


# getMinMax

Protected getMinMax(scale, canStack?): Object

# Parameters

Name Type
scale Scale<CoreScaleOptions>
canStack? boolean

# Returns

Object

Name Type
max number
min number

# Inherited from

DatasetController.getMinMax

# Defined in

types/index.d.ts:656


# getParsed

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

# Parameters

Name Type
index number

# Returns

number | CartesianParsedData | BarParsedData | BubbleParsedData | RadialParsedData

# Inherited from

DatasetController.getParsed

# Defined in

types/index.d.ts:648


# getScaleForId

getScaleForId(scaleID): Scale<CoreScaleOptions>

# Parameters

Name Type
scaleID string

# Returns

Scale<CoreScaleOptions>

# Inherited from

DatasetController.getScaleForId

# Defined in

types/index.d.ts:610


# 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

# Inherited from

DatasetController.getSharedOptions

# Defined in

types/index.d.ts:623


# getStyle

getStyle(index, active): AnyObject

# Parameters

Name Type
index number
active boolean

# Returns

AnyObject

# Inherited from

DatasetController.getStyle

# Defined in

types/index.d.ts:616


# includeOptions

Protected includeOptions(mode, sharedOptions): boolean

Utility for determining if options should be included in the updated properties

# Parameters

Name Type
mode "none" | "hide" | "show" | "default" | "active" | "resize" | "reset"
sharedOptions AnyObject

# Returns

boolean

# Inherited from

DatasetController.includeOptions

# Defined in

types/index.d.ts:628


# initialize

initialize(): void

# Returns

void

# Inherited from

DatasetController.initialize

# Defined in

types/index.d.ts:612


# linkScales

linkScales(): void

# Returns

void

# Inherited from

DatasetController.linkScales

# Defined in

types/index.d.ts:599


# parse

parse(start, count): void

# Parameters

Name Type
start number
count number

# Returns

void

# Inherited from

DatasetController.parse

# Defined in

types/index.d.ts:644


# parseArrayData

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

# Parameters

Name Type
meta ChartMeta<keyof ChartTypeRegistry, default<AnyObject, AnyObject>, default<AnyObject, AnyObject>>
data AnyObject[]
start number
count number

# Returns

AnyObject[]

# Inherited from

DatasetController.parseArrayData

# Defined in

types/index.d.ts:646


# parseObjectData

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

# Parameters

Name Type
meta ChartMeta<keyof ChartTypeRegistry, default<AnyObject, AnyObject>, default<AnyObject, AnyObject>>
data AnyObject[]
start number
count number

# Returns

AnyObject[]

# Inherited from

DatasetController.parseObjectData

# Defined in

types/index.d.ts:647


# parsePrimitiveData

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

# Parameters

Name Type
meta ChartMeta<keyof ChartTypeRegistry, default<AnyObject, AnyObject>, default<AnyObject, AnyObject>>
data AnyObject[]
start number
count number

# Returns

AnyObject[]

# Inherited from

DatasetController.parsePrimitiveData

# Defined in

types/index.d.ts:645


# removeHoverStyle

removeHoverStyle(element, datasetIndex, index): void

# Parameters

Name Type
element default<AnyObject, AnyObject>
datasetIndex number
index number

# Returns

void

# Inherited from

DatasetController.removeHoverStyle

# Defined in

types/index.d.ts:641


# reset

reset(): void

# Returns

void

# Inherited from

DatasetController.reset

# Defined in

types/index.d.ts:607


# resolveDataElementOptions

Protected resolveDataElementOptions(index, mode): AnyObject

# Parameters

Name Type
index number
mode "none" | "hide" | "show" | "default" | "active" | "resize" | "reset"

# Returns

AnyObject

# Inherited from

DatasetController.resolveDataElementOptions

# Defined in

types/index.d.ts:618


# resolveDatasetElementOptions

Protected resolveDatasetElementOptions(mode): AnyObject

# Parameters

Name Type
mode "none" | "hide" | "show" | "default" | "active" | "resize" | "reset"

# Returns

AnyObject

# Inherited from

DatasetController.resolveDatasetElementOptions

# Defined in

types/index.d.ts:617


# setHoverStyle

setHoverStyle(element, datasetIndex, index): void

# Parameters

Name Type
element default<AnyObject, AnyObject>
datasetIndex number
index number

# Returns

void

# Inherited from

DatasetController.setHoverStyle

# Defined in

types/index.d.ts:642


# update

update(mode): void

# Parameters

Name Type
mode "none" | "hide" | "show" | "default" | "active" | "resize" | "reset"

# Returns

void

# Inherited from

DatasetController.update

# Defined in

types/index.d.ts:603


# updateElement

Protected updateElement(element, index, properties, mode): void

Utility for updating an element with new properties, using animations when appropriate.

# Parameters

Name Type
element default<AnyObject, AnyObject>
index number
properties AnyObject
mode "none" | "hide" | "show" | "default" | "active" | "resize" | "reset"

# Returns

void

# Inherited from

DatasetController.updateElement

# Defined in

types/index.d.ts:634


# updateElements

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

# Parameters

Name Type
elements default<AnyObject, AnyObject>[]
start number
count number
mode "none" | "hide" | "show" | "default" | "active" | "resize" | "reset"

# Returns

void

# Inherited from

DatasetController.updateElements

# Defined in

types/index.d.ts:602


# updateIndex

updateIndex(datasetIndex): void

# Parameters

Name Type
datasetIndex number

# Returns

void

# Inherited from

DatasetController.updateIndex

# Defined in

types/index.d.ts:604


# updateRangeFromParsed

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

# Parameters

Name Type
range Object
range.max number
range.min number
scale Scale<CoreScaleOptions>
parsed unknown[]
stack string | boolean

# Returns

void

# Inherited from

DatasetController.updateRangeFromParsed

# Defined in

types/index.d.ts:650


# 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 "none" | "hide" | "show" | "default" | "active" | "resize" | "reset"
newOptions AnyObject

# Returns

void

# Inherited from

DatasetController.updateSharedOptions

# Defined in

types/index.d.ts:640