Class: Chart<TType, TData, TLabel>
Type parameters
Name | Type |
---|---|
TType | extends keyof keyof ChartTypeRegistry |
TData | DistributiveArray <[TType ][“defaultDataPoint” ]> |
TLabel | unknown |
Parameters
Name | Type |
---|---|
item | |
config | ChartConfiguration<TType , TData , TLabel > |
Defined in
index.esm.d.ts:498 (opens new window)
aspectRatio
• Readonly
aspectRatio: number
Defined in
attached
• Readonly
attached: boolean
Defined in
index.esm.d.ts:491 (opens new window)
boxes
• Readonly
boxes: LayoutItem[]
Defined in
index.esm.d.ts:487 (opens new window)
canvas
• Readonly
canvas: HTMLCanvasElement
Defined in
chartArea
• Readonly
chartArea:
Defined in
config
• Readonly
config: <TType
, TData
, TLabel
>
Defined in
ctx
• Readonly
ctx: CanvasRenderingContext2D
Defined in
index.esm.d.ts:482 (opens new window)
currentDevicePixelRatio
• Readonly
currentDevicePixelRatio: number
Defined in
data
• data: <TType
, TData
, TLabel
>
Defined in
height
• Readonly
height: number
Defined in
index.esm.d.ts:485 (opens new window)
id
• Readonly
id: string
Defined in
options
• options: DeepPartial
<<TType
> & ElementChartOptions<TType
> & <TType
> & DatasetChartOptions<TType
> & <TType
> & ChartTypeRegistry[TType
]["chartOptions"
]>
Defined in
index.esm.d.ts:496 (opens new window)
platform
• Readonly
platform: BasePlatform
Defined in
index.esm.d.ts:479 (opens new window)
scales
• Readonly
scales: Object
Index signature
▪ [key: string
]:
Defined in
tooltip
• Optional
Readonly
tooltip: <TType
>
Defined in
width
• Readonly
width: number
Defined in
index.esm.d.ts:484 (opens new window)
▪ Static
Readonly
defaults:
Defined in
instances
▪ Static
Readonly
instances: Object
Index signature
▪ [key: string
]: Chart
Defined in
index.esm.d.ts:538 (opens new window)
overrides
▪ Static
Readonly
overrides: Overrides
Defined in
index.esm.d.ts:536 (opens new window)
registry
▪ Static
Readonly
registry: Registry
Defined in
index.esm.d.ts:539 (opens new window)
version
▪ Static
Readonly
version: string
Defined in
bindEvents
Returns
void
Defined in
buildOrUpdateControllers
▸ buildOrUpdateControllers(): void
Returns
void
Defined in
buildOrUpdateScales
▸ buildOrUpdateScales(): void
Returns
void
Defined in
clear
▸ clear(): <TType
, TData
, >
Returns
<TType
, TData
, TLabel
>
Defined in
destroy
▸ destroy(): void
Returns
void
Defined in
draw
▸ draw(): void
Returns
void
Defined in
ensureScalesHaveIDs
▸ ensureScalesHaveIDs(): void
Returns
void
Defined in
getActiveElements
▸ getActiveElements(): []
Returns
[]
Defined in
getDataVisibility
▸ getDataVisibility(index
): boolean
Parameters
Name | Type |
---|---|
index | number |
Returns
boolean
Defined in
index.esm.d.ts:520 (opens new window)
getDatasetMeta
▸ getDatasetMeta(datasetIndex
): ChartMeta<<AnyObject
, AnyObject
>, Element<AnyObject
, AnyObject
>, keyof >
Parameters
Name | Type |
---|---|
datasetIndex | number |
Returns
ChartMeta<<AnyObject
, AnyObject
>, Element<AnyObject
, AnyObject
>, keyof >
Defined in
getElementsAtEventForMode
▸ getElementsAtEventForMode(e
, mode
, options
, useFinalPosition
): []
Parameters
Name | Type |
---|---|
e | Event |
mode | string |
options | |
useFinalPosition | boolean |
Returns
[]
Defined in
getSortedVisibleDatasetMetas
▸ getSortedVisibleDatasetMetas(): <Element<AnyObject
, AnyObject
>, <AnyObject
, AnyObject
>, keyof ChartTypeRegistry>[]
Returns
ChartMeta<<AnyObject
, AnyObject
>, Element<AnyObject
, AnyObject
>, keyof >[]
Defined in
▸ getVisibleDatasetCount(): number
Returns
number
Defined in
index.esm.d.ts:516 (opens new window)
hide
▸ hide(datasetIndex
, dataIndex?
): void
Parameters
Returns
void
Defined in
isDatasetVisible
▸ isDatasetVisible(datasetIndex
): boolean
Parameters
Name | Type |
---|---|
datasetIndex | number |
Returns
boolean
Defined in
index.esm.d.ts:517 (opens new window)
notifyPlugins
▸ notifyPlugins(hook
, args?
): boolean
| void
Parameters
Name | Type |
---|---|
hook | string |
args? | AnyObject |
Returns
Defined in
render
▸ render(): void
Returns
void
Defined in
reset
▸ reset(): void
Returns
void
Defined in
resize
▸ resize(width?
, height?
): void
Parameters
Name | Type |
---|---|
width? | number |
height? | number |
Returns
void
Defined in
index.esm.d.ts:503 (opens new window)
setActiveElements
▸ setActiveElements(active
):
Parameters
Name | Type |
---|---|
active | [] |
Returns
void
Defined in
index.esm.d.ts:525 (opens new window)
setDatasetVisibility
▸ setDatasetVisibility(datasetIndex
, visible
): void
Parameters
Name | Type |
---|---|
datasetIndex | number |
visible | boolean |
Returns
void
Defined in
show
▸ show(datasetIndex
, dataIndex?
): void
Parameters
Returns
void
Defined in
index.esm.d.ts:522 (opens new window)
stop
▸ stop(): Chart<TType
, TData
, TLabel
>
Returns
Chart<TType
, TData
, TLabel
>
Defined in
index.esm.d.ts:501 (opens new window)
toBase64Image
▸ toBase64Image(type?
, quality?
): string
Parameters
Name | Type |
---|---|
type? | string |
quality? | unknown |
Returns
string
Defined in
toggleDataVisibility
▸ toggleDataVisibility(index
): void
Parameters
Name | Type |
---|---|
index | number |
Returns
void
Defined in
index.esm.d.ts:519 (opens new window)
unbindEvents
▸ unbindEvents(): void
Returns
void
Defined in
index.esm.d.ts:530 (opens new window)
update
▸ update(mode?
): void
Parameters
Name | Type |
---|---|
mode? | “resize” | “reset” | “none” | “hide” | “show” | “normal” | “active” |
Returns
void
Defined in
updateHoverStyle
▸ updateHoverStyle(items
, mode
, enabled
): void
Parameters
Name | Type |
---|---|
items | Element<AnyObject , AnyObject > |
mode | “dataset” |
enabled | boolean |
Returns
void
Defined in
getChart
▸ Static
getChart(key
): <keyof ChartTypeRegistry, (number
| | BubbleDataPoint)[], unknown
>
Parameters
Name | Type |
---|---|
key | string | HTMLCanvasElement | CanvasRenderingContext2D |
Returns
<keyof ChartTypeRegistry, (number
| | BubbleDataPoint)[], unknown
>
Defined in
index.esm.d.ts:540 (opens new window)
▸ Static
register(…items
): void
Parameters
Returns
void
Defined in
index.esm.d.ts:541 (opens new window)
unregister
▸ Static
unregister(…items
): void
Parameters
Name | Type |
---|---|
…items | [] |
Returns
void