# Interface: Tooltip
# Hierarchy
-
↳
Tooltip
# Properties
# defaults
• Optional
defaults: Partial
<AnyObject
>
Default options used in the plugin
# Inherited from
# Defined in
types/index.d.ts:1122
# events
• Optional
events: keyof HTMLElementEventMap
[]
The events option defines the browser events that the plugin should listen.
Default
['mousemove', 'mouseout', 'click', 'touchstart', 'touchmove']
# Inherited from
# Defined in
types/index.d.ts:823
# id
• id: string
# Inherited from
# Defined in
types/index.d.ts:817
# positioners
• Readonly
positioners: TooltipPositionerMap
# Defined in
types/index.d.ts:2654
# Methods
# afterBuildTicks
▸ Optional
afterBuildTicks(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.scale | Scale <CoreScaleOptions > | The scale. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:982
# afterDataLimits
▸ Optional
afterDataLimits(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.scale | Scale <CoreScaleOptions > | The scale. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:966
# afterDatasetDraw
▸ Optional
afterDatasetDraw(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.index | number | The dataset index. |
args.meta | ChartMeta <keyof ChartTypeRegistry , default <AnyObject , AnyObject >, default <AnyObject , AnyObject >> | The dataset metadata. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:1064
# afterDatasetUpdate
▸ Optional
afterDatasetUpdate(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.cancelable | false | - |
args.index | number | The dataset index. |
args.meta | ChartMeta <keyof ChartTypeRegistry , default <AnyObject , AnyObject >, default <AnyObject , AnyObject >> | The dataset metadata. |
args.mode | "none" | "hide" | "show" | "default" | "active" | "resize" | "reset" | The update mode. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:941
# afterDatasetsDraw
▸ Optional
afterDatasetsDraw(chart
, args
, options
, cancelable
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | EmptyObject | The call arguments. |
options | AnyObject | The plugin options. |
cancelable | false | - |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:1041
# afterDatasetsUpdate
▸ Optional
afterDatasetsUpdate(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.cancelable | true | - |
args.mode | "none" | "hide" | "show" | "default" | "active" | "resize" | "reset" | The update mode. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:918
# afterDestroy
▸ Optional
afterDestroy(chart
, args
, options
): void
Called after the chart has been destroyed.
# Parameters
Name | Type | Description |
---|---|---|
chart | Chart <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | EmptyObject | The call arguments. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:1109
# afterDraw
▸ Optional
afterDraw(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | EmptyObject | The call arguments. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:1024
# afterEvent
▸ Optional
afterEvent(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.cancelable | false | - |
args.changed? | boolean | Set to true if the plugin needs a render. Should only be changed to true, because this args object is passed through all plugins. |
args.event | ChartEvent | The event object. |
args.inChartArea | boolean | The event position is inside chartArea |
args.replay | boolean | True if this event is replayed from Chart.update |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:1087
# afterInit
▸ Optional
afterInit(chart
, args
, options
): void
Desc
Called after chart
has been initialized and before the first update.
# Parameters
Name | Type | Description |
---|---|---|
chart | Chart <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | EmptyObject | The call arguments. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:862
# afterLayout
▸ Optional
afterLayout(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | EmptyObject | The call arguments. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:990
# afterRender
▸ Optional
afterRender(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | EmptyObject | The call arguments. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:1007
# afterTooltipDraw
▸ Optional
afterTooltipDraw(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.tooltip | TooltipModel <keyof ChartTypeRegistry > | The tooltip. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:2706
# afterUpdate
▸ Optional
afterUpdate(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.mode | "none" | "hide" | "show" | "default" | "active" | "resize" | "reset" | The update mode |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:881
# beforeBuildTicks
▸ Optional
beforeBuildTicks(chart
, args
, options
): void
Desc
Called before scale builds its ticks. This hook is called separately for each scale in the chart.
# Parameters
Name | Type | Description |
---|---|---|
chart | Chart <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.scale | Scale <CoreScaleOptions > | The scale. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:974
# beforeDataLimits
▸ Optional
beforeDataLimits(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.scale | Scale <CoreScaleOptions > | The scale. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:958
# beforeDatasetDraw
▸ Optional
beforeDatasetDraw(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.index | number | The dataset index. |
args.meta | ChartMeta <keyof ChartTypeRegistry , default <AnyObject , AnyObject >, default <AnyObject , AnyObject >> | The dataset metadata. |
options | AnyObject | The plugin options. |
# Returns
boolean
| void
false
to cancel the chart datasets drawing.
# Inherited from
# Defined in
types/index.d.ts:1053
# beforeDatasetUpdate
▸ Optional
beforeDatasetUpdate(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.cancelable | true | - |
args.index | number | The dataset index. |
args.meta | ChartMeta <keyof ChartTypeRegistry , default <AnyObject , AnyObject >, default <AnyObject , AnyObject >> | The dataset metadata. |
args.mode | "none" | "hide" | "show" | "default" | "active" | "resize" | "reset" | The update mode. |
options | AnyObject | The plugin options. |
# Returns
boolean
| void
false
to cancel the chart datasets drawing.
# Inherited from
# Defined in
types/index.d.ts:930
# beforeDatasetsDraw
▸ Optional
beforeDatasetsDraw(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.cancelable | true | - |
options | AnyObject | The plugin options. |
# Returns
boolean
| void
false
to cancel the chart datasets drawing.
# Inherited from
# Defined in
types/index.d.ts:1033
# beforeDatasetsUpdate
▸ Optional
beforeDatasetsUpdate(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.mode | "none" | "hide" | "show" | "default" | "active" | "resize" | "reset" | The update mode. |
options | AnyObject | The plugin options. |
# Returns
boolean
| void
false to cancel the datasets update.
# Inherited from
# Defined in
types/index.d.ts:908
# beforeDestroy
▸ Optional
beforeDestroy(chart
, args
, options
): void
Called before the chart is being destroyed.
# Parameters
Name | Type | Description |
---|---|---|
chart | Chart <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | EmptyObject | The call arguments. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:1102
# beforeDraw
▸ Optional
beforeDraw(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.cancelable | true | - |
options | AnyObject | The plugin options. |
# Returns
boolean
| void
false
to cancel the chart drawing.
# Inherited from
# Defined in
types/index.d.ts:1016
# beforeElementsUpdate
▸ Optional
beforeElementsUpdate(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | EmptyObject | The call arguments. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:889
# beforeEvent
▸ Optional
beforeEvent(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.cancelable | true | - |
args.event | ChartEvent | The event object. |
args.inChartArea | boolean | The event position is inside chartArea |
args.replay | boolean | True if this event is replayed from Chart.update |
options | AnyObject | The plugin options. |
# Returns
boolean
| void
# Inherited from
# Defined in
types/index.d.ts:1075
# beforeInit
▸ Optional
beforeInit(chart
, args
, options
): void
Desc
Called before initializing chart
.
# Parameters
Name | Type | Description |
---|---|---|
chart | Chart <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | EmptyObject | The call arguments. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:855
# beforeLayout
▸ Optional
beforeLayout(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.cancelable | true | - |
options | AnyObject | The plugin options. |
# Returns
boolean
| void
false
to cancel the chart layout.
# Inherited from
# Defined in
types/index.d.ts:950
# beforeRender
▸ Optional
beforeRender(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.cancelable | true | - |
options | AnyObject | The plugin options. |
# Returns
boolean
| void
false
to cancel the chart rendering.
# Inherited from
# Defined in
types/index.d.ts:999
# beforeTooltipDraw
▸ Optional
beforeTooltipDraw(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.cancelable | true | - |
args.tooltip | TooltipModel <keyof ChartTypeRegistry > | The tooltip. |
options | AnyObject | The plugin options. |
# Returns
boolean
| void
false
to cancel the chart tooltip drawing.
# Inherited from
# Defined in
types/index.d.ts:2697
# beforeUpdate
▸ Optional
beforeUpdate(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | Object | The call arguments. |
args.cancelable | true | - |
args.mode | "none" | "hide" | "show" | "default" | "active" | "resize" | "reset" | The update mode |
options | AnyObject | The plugin options. |
# Returns
boolean
| void
false
to cancel the chart update.
# Inherited from
# Defined in
types/index.d.ts:872
# install
▸ Optional
install(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | EmptyObject | The call arguments. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:832
# reset
▸ Optional
reset(chart
, args
, options
): void
Desc
Called during chart reset
Since
version 3.0.0
# Parameters
Name | Type | Description |
---|---|---|
chart | Chart <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | EmptyObject | The call arguments. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:897
# resize
▸ Optional
resize(chart
, args
, options
): void
Desc
Called after the chart as been resized.
# Parameters
Name | Type | Description |
---|---|---|
chart | Chart <keyof ChartTypeRegistry , (number | [number , number ] | Point | 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 | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:1095
# start
▸ Optional
start(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | EmptyObject | The call arguments. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:840
# stop
▸ Optional
stop(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | EmptyObject | The call arguments. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:848
# uninstall
▸ Optional
uninstall(chart
, args
, options
): 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 <keyof ChartTypeRegistry , (number | [number , number ] | Point | BubbleDataPoint )[], unknown > | The chart instance. |
args | EmptyObject | The call arguments. |
options | AnyObject | The plugin options. |
# Returns
void
# Inherited from
# Defined in
types/index.d.ts:1117