- Interface: Plugin<TType, O>
- Type parameters
- Hierarchy
- Properties
- Methods
- afterBuildTicks
- afterDataLimits
- afterDatasetDraw
- afterDatasetUpdate
- afterDatasetsDraw
- afterDatasetsUpdate
- afterDraw
- afterEvent
- afterInit
- afterLayout
- afterRender
- afterTooltipDraw
- afterUpdate
- beforeBuildTicks
- beforeDataLimits
- beforeDatasetDraw
- beforeDatasetUpdate
- beforeDatasetsDraw
- beforeDatasetsUpdate
- beforeDraw
- beforeElementsUpdate
- beforeEvent
- beforeInit
- beforeLayout
- beforeRender
- beforeTooltipDraw
- beforeUpdate
- destroy
- install
- reset
- resize
- start
- stop
- uninstall
Interface: Plugin<TType, O>
Type parameters
Name | Type | Default |
---|---|---|
TType | ChartType | ChartType |
O | - | AnyObject |
Hierarchy
ExtendedPlugin<TType>
↳ Plugin
Properties
id
• id: string
Defined in: index.esm.d.ts:746 (opens new window)
Methods
afterBuildTicks
▸ Optional
afterBuildTicks(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { scale
: Scale<CoreScaleOptions> }, options
: O): void
desc
Called after scale has build its ticks. This hook is called separately for each scale in the chart.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.scale | Scale<CoreScaleOptions> | The scale. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:905 (opens new window)
afterDataLimits
▸ Optional
afterDataLimits(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { scale
: Scale<CoreScaleOptions> }, options
: O): void
desc
Called after scale data limits are calculated. This hook is called separately for each scale in the chart.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.scale | Scale<CoreScaleOptions> | The scale. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:889 (opens new window)
afterDatasetDraw
▸ Optional
afterDatasetDraw(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { index
: number ; meta
: ChartMeta<Element<{}, {}>, Element<{}, {}>> }, options
: O): void
desc
Called after the chart
datasets at the given args.index
have been drawn (datasets are drawn in the reverse order). Note that this hook will not be called if the datasets drawing has been previously cancelled.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.index | number | The dataset index. |
args.meta | ChartMeta<Element<{}, {}>, Element<{}, {}>> | The dataset metadata. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:987 (opens new window)
afterDatasetUpdate
▸ Optional
afterDatasetUpdate(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { cancelable
: false ; index
: number ; meta
: ChartMeta<Element<{}, {}>, Element<{}, {}>> ; mode
: resize | reset | none | hide | show | normal | active }, options
: O): void
desc
Called after the chart
datasets at the given args.index
has been updated. Note that this hook will not be called if the datasets update has been previously cancelled.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.cancelable | false | - |
args.index | number | The dataset index. |
args.meta | ChartMeta<Element<{}, {}>, Element<{}, {}>> | The dataset metadata. |
args.mode | resize | reset | none | hide | show | normal | active | The update mode. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:864 (opens new window)
afterDatasetsDraw
▸ Optional
afterDatasetsDraw(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: Record<string, never>, options
: O, cancelable
: false): void
desc
Called after the chart
datasets have been drawn. Note that this hook will not be called if the datasets drawing has been previously cancelled.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | Record<string, never> | The call arguments. |
options | O | The plugin options. |
cancelable | false | - |
Returns: void
Defined in: index.esm.d.ts:964 (opens new window)
afterDatasetsUpdate
▸ Optional
afterDatasetsUpdate(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { cancelable
: true ; mode
: resize | reset | none | hide | show | normal | active }, options
: O): void
desc
Called after the chart
datasets have been updated. Note that this hook will not be called if the datasets update has been previously cancelled.
since
version 2.1.5
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.cancelable | true | - |
args.mode | resize | reset | none | hide | show | normal | active | The update mode. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:841 (opens new window)
afterDraw
▸ Optional
afterDraw(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: Record<string, never>, options
: O): void
desc
Called after the chart
has been drawn. Note that this hook will not be called if the drawing has been previously cancelled.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | Record<string, never> | The call arguments. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:947 (opens new window)
afterEvent
▸ Optional
afterEvent(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { cancelable
: false ; changed?
: boolean ; event
: ChartEvent ; replay
: boolean }, options
: O): void
desc
Called after the event
has been consumed. Note that this hook will not be called if the event
has been previously discarded.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.cancelable | false | - |
args.changed? | boolean | - |
args.event | ChartEvent | The event object. |
args.replay | boolean | True if this event is replayed from Chart.update |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:1008 (opens new window)
afterInit
▸ Optional
afterInit(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: Record<string, never>, options
: O): void
desc
Called after chart
has been initialized and before the first update.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | Record<string, never> | The call arguments. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:785 (opens new window)
afterLayout
▸ Optional
afterLayout(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: Record<string, never>, options
: O): void
desc
Called after the chart
has been laid out. Note that this hook will not be called if the layout update has been previously cancelled.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | Record<string, never> | The call arguments. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:913 (opens new window)
afterRender
▸ Optional
afterRender(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: Record<string, never>, options
: O): void
desc
Called after the chart
has been fully rendered (and animation completed). Note that this hook will not be called if the rendering has been previously cancelled.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | Record<string, never> | The call arguments. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:930 (opens new window)
afterTooltipDraw
▸ Optional
afterTooltipDraw(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { tooltip
: TooltipModel<TType> }, options
: Record<string, unknown>): void
desc
Called after drawing the tooltip
. Note that this hook will not be called if the tooltip drawing has been previously cancelled.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.tooltip | TooltipModel<TType> | The tooltip. |
options | Record<string, unknown> | The plugin options. |
Returns: void
Inherited from: ExtendedPlugin
Defined in: index.esm.d.ts:2388 (opens new window)
afterUpdate
▸ Optional
afterUpdate(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { mode
: resize | reset | none | hide | show | normal | active }, options
: O): void
desc
Called after chart
has been updated and before rendering. Note that this hook will not be called if the chart update has been previously cancelled.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.mode | resize | reset | none | hide | show | normal | active | The update mode |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:804 (opens new window)
beforeBuildTicks
▸ Optional
beforeBuildTicks(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { scale
: Scale<CoreScaleOptions> }, options
: O): void
desc
Called before scale bulds its ticks. This hook is called separately for each scale in the chart.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.scale | Scale<CoreScaleOptions> | The scale. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:897 (opens new window)
beforeDataLimits
▸ Optional
beforeDataLimits(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { scale
: Scale<CoreScaleOptions> }, options
: O): void
desc
Called before scale data limits are calculated. This hook is called separately for each scale in the chart.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.scale | Scale<CoreScaleOptions> | The scale. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:881 (opens new window)
beforeDatasetDraw
▸ Optional
beforeDatasetDraw(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { index
: number ; meta
: ChartMeta<Element<{}, {}>, Element<{}, {}>> }, options
: O): boolean | void
desc
Called before drawing the chart
dataset at the given args.index
(datasets are drawn in the reverse order). If any plugin returns false
, the datasets drawing is cancelled until another render
is triggered.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.index | number | The dataset index. |
args.meta | ChartMeta<Element<{}, {}>, Element<{}, {}>> | The dataset metadata. |
options | O | The plugin options. |
Returns: boolean | void
false
to cancel the chart datasets drawing.
Defined in: index.esm.d.ts:976 (opens new window)
beforeDatasetUpdate
▸ Optional
beforeDatasetUpdate(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { cancelable
: true ; index
: number ; meta
: ChartMeta<Element<{}, {}>, Element<{}, {}>> ; mode
: resize | reset | none | hide | show | normal | active }, options
: O): boolean | void
desc
Called before updating the chart
dataset at the given args.index
. If any plugin returns false
, the datasets update is cancelled until another update
is triggered.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.cancelable | true | - |
args.index | number | The dataset index. |
args.meta | ChartMeta<Element<{}, {}>, Element<{}, {}>> | The dataset metadata. |
args.mode | resize | reset | none | hide | show | normal | active | The update mode. |
options | O | The plugin options. |
Returns: boolean | void
false
to cancel the chart datasets drawing.
Defined in: index.esm.d.ts:853 (opens new window)
beforeDatasetsDraw
▸ Optional
beforeDatasetsDraw(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { cancelable
: true }, options
: O): boolean | void
desc
Called before drawing the chart
datasets. If any plugin returns false
, the datasets drawing is cancelled until another render
is triggered.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.cancelable | true | - |
options | O | The plugin options. |
Returns: boolean | void
false
to cancel the chart datasets drawing.
Defined in: index.esm.d.ts:956 (opens new window)
beforeDatasetsUpdate
▸ Optional
beforeDatasetsUpdate(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { mode
: resize | reset | none | hide | show | normal | active }, options
: O): boolean | void
desc
Called before updating the chart
datasets. If any plugin returns false
, the datasets update is cancelled until another update
is triggered.
since
version 2.1.5
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.mode | resize | reset | none | hide | show | normal | active | The update mode. |
options | O | The plugin options. |
Returns: boolean | void
false to cancel the datasets update.
Defined in: index.esm.d.ts:831 (opens new window)
beforeDraw
▸ Optional
beforeDraw(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { cancelable
: true }, options
: O): boolean | void
desc
Called before drawing chart
at every animation frame. If any plugin returns false
, the frame drawing is cancelled untilanother render
is triggered.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.cancelable | true | - |
options | O | The plugin options. |
Returns: boolean | void
false
to cancel the chart drawing.
Defined in: index.esm.d.ts:939 (opens new window)
beforeElementsUpdate
▸ Optional
beforeElementsUpdate(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: Record<string, never>, options
: O): void
desc
Called during the update process, before any chart elements have been created. This can be used for data decimation by changing the data array inside a dataset.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | Record<string, never> | The call arguments. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:812 (opens new window)
beforeEvent
▸ Optional
beforeEvent(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { cancelable
: true ; event
: ChartEvent ; replay
: boolean }, options
: O): boolean | void
desc
Called before processing the specified event
. If any plugin returns false
, the event will be discarded.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.cancelable | true | - |
args.event | ChartEvent | The event object. |
args.replay | boolean | True if this event is replayed from Chart.update |
options | O | The plugin options. |
Returns: boolean | void
Defined in: index.esm.d.ts:997 (opens new window)
beforeInit
▸ Optional
beforeInit(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: Record<string, never>, options
: O): void
desc
Called before initializing chart
.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | Record<string, never> | The call arguments. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:778 (opens new window)
beforeLayout
▸ Optional
beforeLayout(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { cancelable
: true }, options
: O): boolean | void
desc
Called before laying out chart
. If any plugin returns false
, the layout update is cancelled until another update
is triggered.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.cancelable | true | - |
options | O | The plugin options. |
Returns: boolean | void
false
to cancel the chart layout.
Defined in: index.esm.d.ts:873 (opens new window)
beforeRender
▸ Optional
beforeRender(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { cancelable
: true }, options
: O): boolean | void
desc
Called before rendering chart
. If any plugin returns false
, the rendering is cancelled until another render
is triggered.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.cancelable | true | - |
options | O | The plugin options. |
Returns: boolean | void
false
to cancel the chart rendering.
Defined in: index.esm.d.ts:922 (opens new window)
beforeTooltipDraw
▸ Optional
beforeTooltipDraw(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { tooltip
: TooltipModel<TType> }, options
: Record<string, unknown>): boolean | void
desc
Called before drawing the tooltip
. If any plugin returns false
, the tooltip drawing is cancelled until another render
is triggered.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.tooltip | TooltipModel<TType> | The tooltip. |
options | Record<string, unknown> | The plugin options. |
Returns: boolean | void
false
to cancel the chart tooltip drawing.
Inherited from: ExtendedPlugin
Defined in: index.esm.d.ts:2379 (opens new window)
beforeUpdate
▸ Optional
beforeUpdate(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { cancelable
: true ; mode
: resize | reset | none | hide | show | normal | active }, options
: O): boolean | void
desc
Called before updating chart
. If any plugin returns false
, the update is cancelled (and thus subsequent render(s)) until another update
is triggered.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.cancelable | true | - |
args.mode | resize | reset | none | hide | show | normal | active | The update mode |
options | O | The plugin options. |
Returns: boolean | void
false
to cancel the chart update.
Defined in: index.esm.d.ts:795 (opens new window)
destroy
▸ Optional
destroy(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: Record<string, never>, options
: O): void
Called after the chart has been destroyed.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | Record<string, never> | The call arguments. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:1023 (opens new window)
install
▸ Optional
install(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: Record<string, never>, options
: O): void
desc
Called when plugin is installed for this chart instance. This hook is also invoked for disabled plugins (options === false).
since
3.0.0
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | Record<string, never> | The call arguments. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:755 (opens new window)
reset
▸ Optional
reset(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: Record<string, never>, options
: O): void
desc
Called during chart reset
since
version 3.0.0
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | Record<string, never> | The call arguments. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:820 (opens new window)
resize
▸ Optional
resize(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: { size
: { height
: number ; width
: number } }, options
: O): void
desc
Called after the chart as been resized.
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | object | The call arguments. |
args.size | object | The new canvas display size (eq. canvas.style width & height). |
args.size.height | number | - |
args.size.width | number | - |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:1016 (opens new window)
start
▸ Optional
start(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: Record<string, never>, options
: O): void
desc
Called when a plugin is starting. This happens when chart is created or plugin is enabled.
since
3.0.0
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | Record<string, never> | The call arguments. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:763 (opens new window)
stop
▸ Optional
stop(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: Record<string, never>, options
: O): void
desc
Called when a plugin stopping. This happens when chart is destroyed or plugin is disabled.
since
3.0.0
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | Record<string, never> | The call arguments. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:771 (opens new window)
uninstall
▸ Optional
uninstall(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown>, args
: Record<string, never>, options
: O): void
Called after chart is destroyed on all plugins that were installed for that chart. This hook is also invoked for disabled plugins (options === false).
since
3.0.0
Parameters:
Name | Type | Description |
---|---|---|
chart | Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | BubbleDataPoint)[], unknown> | The chart instance. |
args | Record<string, never> | The call arguments. |
options | O | The plugin options. |
Returns: void
Defined in: index.esm.d.ts:1031 (opens new window)