- Interface: DoughnutController
- Hierarchy
- Properties
- Methods
- addElements
- applyStack
- buildOrUpdateElements
- calculateCircumference
- calculateTotal
- configure
- draw
- getAllParsedValues
- getDataset
- getLabelAndValue
- getMaxOverflow
- getMeta
- getMinMax
- getParsed
- getScaleForId
- getSharedOptions
- getStyle
- includeOptions
- initialize
- linkScales
- parse
- parseArrayData
- parseObjectData
- parsePrimitiveData
- removeHoverStyle
- reset
- resolveDataElementOptions
- resolveDatasetElementOptions
- setHoverStyle
- update
- updateElement
- updateElements
- updateIndex
- updateRangeFromParsed
- updateSharedOptions
Interface: DoughnutController
Hierarchy
-
↳
DoughnutController
Properties
_cachedMeta
• Readonly
_cachedMeta: ChartMeta
<Element
<Object
, Object
>, Element
<Object
, Object
>>
Inherited from
Defined in
index.esm.d.ts:550 (opens new window)
chart
• Readonly
chart: Chart
<"bar"
| "line"
| "scatter"
| "bubble"
| "pie"
| "doughnut"
| "polarArea"
| "radar"
, (number
| ScatterDataPoint
| BubbleDataPoint
)[], unknown
>
Inherited from
Defined in
index.esm.d.ts:548 (opens new window)
enableOptionSharing
• enableOptionSharing: boolean
Inherited from
DatasetController.enableOptionSharing
Defined in
index.esm.d.ts:551 (opens new window)
index
• Readonly
index: number
Inherited from
Defined in
index.esm.d.ts:549 (opens new window)
innerRadius
• Readonly
innerRadius: number
Defined in
index.esm.d.ts:316 (opens new window)
offsetX
• Readonly
offsetX: number
Defined in
index.esm.d.ts:318 (opens new window)
offsetY
• Readonly
offsetY: number
Defined in
index.esm.d.ts:319 (opens new window)
outerRadius
• Readonly
outerRadius: number
Defined in
index.esm.d.ts:317 (opens new window)
Methods
addElements
▸ addElements(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:567 (opens new window)
applyStack
▸ Protected
applyStack(scale
, parsed
): number
Parameters
Name | Type |
---|---|
scale | Scale <CoreScaleOptions > |
parsed | unknown [] |
Returns
number
Inherited from
Defined in
index.esm.d.ts:603 (opens new window)
buildOrUpdateElements
▸ buildOrUpdateElements(resetNewElements?
): void
Parameters
Name | Type |
---|---|
resetNewElements? | boolean |
Returns
void
Inherited from
DatasetController.buildOrUpdateElements
Defined in
index.esm.d.ts:568 (opens new window)
calculateCircumference
▸ calculateCircumference(value
): number
Parameters
Name | Type |
---|---|
value | number |
Returns
number
Defined in
index.esm.d.ts:322 (opens new window)
calculateTotal
▸ calculateTotal(): number
Returns
number
Defined in
index.esm.d.ts:321 (opens new window)
configure
▸ configure(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:565 (opens new window)
draw
▸ draw(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:560 (opens new window)
getAllParsedValues
▸ getAllParsedValues(scale
): number
[]
Parameters
Name | Type |
---|---|
scale | Scale <CoreScaleOptions > |
Returns
number
[]
Inherited from
DatasetController.getAllParsedValues
Defined in
index.esm.d.ts:554 (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
Defined in
index.esm.d.ts:562 (opens new window)
getLabelAndValue
▸ Protected
getLabelAndValue(index
): Object
Parameters
Name | Type |
---|---|
index | number |
Returns
Object
Name | Type |
---|---|
label | string |
value | string |
Inherited from
DatasetController.getLabelAndValue
Defined in
index.esm.d.ts:555 (opens new window)
getMaxOverflow
▸ Protected
getMaxOverflow(): number
| boolean
Returns
number
| boolean
Inherited from
DatasetController.getMaxOverflow
Defined in
index.esm.d.ts:559 (opens new window)
getMeta
▸ getMeta(): ChartMeta
<Element
<Object
, Object
>, Element
<Object
, Object
>>
Returns
ChartMeta
<Element
<Object
, Object
>, Element
<Object
, Object
>>
Inherited from
Defined in
index.esm.d.ts:563 (opens new window)
getMinMax
▸ Protected
getMinMax(scale
, canStack?
): Object
Parameters
Name | Type |
---|---|
scale | Scale <CoreScaleOptions > |
canStack? | boolean |
Returns
Object
Name | Type |
---|---|
max | number |
min | number |
Inherited from
Defined in
index.esm.d.ts:610 (opens new window)
getParsed
▸ Protected
getParsed(index
): number
| BarParsedData
| CartesianParsedData
| BubbleParsedData
| RadialParsedData
Parameters
Name | Type |
---|---|
index | number |
Returns
number
| BarParsedData
| CartesianParsedData
| BubbleParsedData
| RadialParsedData
Inherited from
Defined in
index.esm.d.ts:602 (opens new window)
getScaleForId
▸ getScaleForId(scaleID
): Scale
<CoreScaleOptions
>
Parameters
Name | Type |
---|---|
scaleID | string |
Returns
Inherited from
DatasetController.getScaleForId
Defined in
index.esm.d.ts:564 (opens new window)
getSharedOptions
▸ Protected
getSharedOptions(options
): Record
<string
, unknown
>
Utility for checking if the options are shared and should be animated separately.
Parameters
Name | Type |
---|---|
options | Record <string , unknown > |
Returns
Record
<string
, unknown
>
Inherited from
DatasetController.getSharedOptions
Defined in
index.esm.d.ts:577 (opens new window)
getStyle
▸ getStyle(index
, active
): Record
<string
, unknown
>
Parameters
Name | Type |
---|---|
index | number |
active | boolean |
Returns
Record
<string
, unknown
>
Inherited from
Defined in
index.esm.d.ts:570 (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 | Record <string , unknown > |
Returns
boolean
Inherited from
DatasetController.includeOptions
Defined in
index.esm.d.ts:582 (opens new window)
initialize
▸ initialize(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:566 (opens new window)
linkScales
▸ linkScales(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:553 (opens new window)
parse
▸ parse(start
, count
): void
Parameters
Name | Type |
---|---|
start | number |
count | number |
Returns
void
Inherited from
Defined in
index.esm.d.ts:598 (opens new window)
parseArrayData
▸ Protected
parseArrayData(meta
, data
, start
, count
): Record
<string
, unknown
>[]
Parameters
Name | Type |
---|---|
meta | ChartMeta <Element <Object , Object >, Element <Object , Object >> |
data | Record <string , unknown >[] |
start | number |
count | number |
Returns
Record
<string
, unknown
>[]
Inherited from
DatasetController.parseArrayData
Defined in
index.esm.d.ts:600 (opens new window)
parseObjectData
▸ Protected
parseObjectData(meta
, data
, start
, count
): Record
<string
, unknown
>[]
Parameters
Name | Type |
---|---|
meta | ChartMeta <Element <Object , Object >, Element <Object , Object >> |
data | Record <string , unknown >[] |
start | number |
count | number |
Returns
Record
<string
, unknown
>[]
Inherited from
DatasetController.parseObjectData
Defined in
index.esm.d.ts:601 (opens new window)
parsePrimitiveData
▸ Protected
parsePrimitiveData(meta
, data
, start
, count
): Record
<string
, unknown
>[]
Parameters
Name | Type |
---|---|
meta | ChartMeta <Element <Object , Object >, Element <Object , Object >> |
data | Record <string , unknown >[] |
start | number |
count | number |
Returns
Record
<string
, unknown
>[]
Inherited from
DatasetController.parsePrimitiveData
Defined in
index.esm.d.ts:599 (opens new window)
removeHoverStyle
▸ removeHoverStyle(element
, datasetIndex
, index
): void
Parameters
Name | Type |
---|---|
element | Element <Object , Object > |
datasetIndex | number |
index | number |
Returns
void
Inherited from
DatasetController.removeHoverStyle
Defined in
index.esm.d.ts:595 (opens new window)
reset
▸ reset(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:561 (opens new window)
resolveDataElementOptions
▸ Protected
resolveDataElementOptions(index
, mode
): Record
<string
, unknown
>
Parameters
Name | Type |
---|---|
index | number |
mode | “resize” | “reset” | “none” | “hide” | “show” | “normal” | “active” |
Returns
Record
<string
, unknown
>
Inherited from
DatasetController.resolveDataElementOptions
Defined in
index.esm.d.ts:572 (opens new window)
resolveDatasetElementOptions
▸ Protected
resolveDatasetElementOptions(mode
): Record
<string
, unknown
>
Parameters
Name | Type |
---|---|
mode | “resize” | “reset” | “none” | “hide” | “show” | “normal” | “active” |
Returns
Record
<string
, unknown
>
Inherited from
DatasetController.resolveDatasetElementOptions
Defined in
index.esm.d.ts:571 (opens new window)
setHoverStyle
▸ setHoverStyle(element
, datasetIndex
, index
): void
Parameters
Name | Type |
---|---|
element | Element <Object , Object > |
datasetIndex | number |
index | number |
Returns
void
Inherited from
DatasetController.setHoverStyle
Defined in
index.esm.d.ts:596 (opens new window)
update
▸ update(mode
): void
Parameters
Name | Type |
---|---|
mode | “resize” | “reset” | “none” | “hide” | “show” | “normal” | “active” |
Returns
void
Inherited from
Defined in
index.esm.d.ts:557 (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 | Element <Object , Object > |
index | number |
properties | Record <string , unknown > |
mode | “resize” | “reset” | “none” | “hide” | “show” | “normal” | “active” |
Returns
void
Inherited from
DatasetController.updateElement
Defined in
index.esm.d.ts:588 (opens new window)
updateElements
▸ updateElements(elements
, start
, count
, mode
): void
Parameters
Name | Type |
---|---|
elements | Element <Object , Object >[] |
start | number |
count | number |
mode | “resize” | “reset” | “none” | “hide” | “show” | “normal” | “active” |
Returns
void
Inherited from
DatasetController.updateElements
Defined in
index.esm.d.ts:556 (opens new window)
updateIndex
▸ updateIndex(datasetIndex
): void
Parameters
Name | Type |
---|---|
datasetIndex | number |
Returns
void
Inherited from
Defined in
index.esm.d.ts:558 (opens new window)
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
index.esm.d.ts:604 (opens new window)
updateSharedOptions
▸ Protected
updateSharedOptions(sharedOptions
, mode
, newOptions
): void
Utility to animate the shared options, that are potentially affecting multiple elements.
Parameters
Name | Type |
---|---|
sharedOptions | Record <string , unknown > |
mode | “resize” | “reset” | “none” | “hide” | “show” | “normal” | “active” |
newOptions | Record <string , unknown > |
Returns
void
Inherited from
DatasetController.updateSharedOptions