Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Plugin

Hierarchy

  • Plugin

Index

Properties

Optional afterBuildTicks

afterBuildTicks?: ScriptableFunction<void>
desc

Called after scale has build its ticks. This hook is called separately for each scale in the chart.

param chart

The chart instance.

param args

The call arguments.

param args.scale

The scale.

param options

The plugin options.

Optional afterDataLimits

afterDataLimits?: ScriptableFunction<void>
desc

Called after scale data limits are calculated. This hook is called separately for each scale in the chart.

param chart

The chart instance.

param args

The call arguments.

param args.scale

The scale.

param options

The plugin options.

Optional afterDatasetDraw

afterDatasetDraw?: ScriptableFunction<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.

param chart

The chart instance.

param args

The call arguments.

param args.index

The dataset index.

param args.meta

The dataset metadata.

param options

The plugin options.

Optional afterDatasetUpdate

afterDatasetUpdate?: ScriptableFunction<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.

param chart

The chart instance.

param args

The call arguments.

param args.index

The dataset index.

param args.meta

The dataset metadata.

param args.mode

The update mode.

param options

The plugin options.

Optional afterDatasetsDraw

afterDatasetsDraw?: ScriptableFunction<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.

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

Optional afterDatasetsUpdate

afterDatasetsUpdate?: ScriptableFunction<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.

param chart

The chart instance.

param args

The call arguments.

param args.mode

The update mode.

param options

The plugin options.

since

version 2.1.5

Optional afterDestroy

afterDestroy?: ScriptableFunction<void>

Called after the chart has been destroyed.

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

Optional afterDraw

afterDraw?: ScriptableFunction<void>
desc

Called after the chart has been drawn. Note that this hook will not be called if the drawing has been previously cancelled.

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

Optional afterEvent

afterEvent?: ScriptableFunction<void>
desc

Called after the event has been consumed. Note that this hook will not be called if the event has been previously discarded.

param chart

The chart instance.

param args

The call arguments.

param args.event

The event object.

param args.replay

True if this event is replayed from Chart.update

param args.inChartArea

The event position is inside chartArea

param [args.changed]

Set to true if the plugin needs a render. Should only be changed to true, because this args object is passed through all plugins.

param options

The plugin options.

Optional afterInit

afterInit?: ScriptableFunction<void>
desc

Called after chart has been initialized and before the first update.

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

Optional afterLayout

afterLayout?: ScriptableFunction<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.

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

Optional afterRender

afterRender?: ScriptableFunction<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.

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

Optional afterTooltipDraw

afterTooltipDraw?: ScriptableFunction<void>
desc

Called after drawing the tooltip. Note that this hook will not be called if the tooltip drawing has been previously cancelled.

param chart

The chart instance.

param args

The call arguments.

param args.tooltip

The tooltip.

param options

The plugin options.

Optional afterUpdate

afterUpdate?: ScriptableFunction<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.

param chart

The chart instance.

param args

The call arguments.

param args.mode

The update mode

param options

The plugin options.

Optional beforeBuildTicks

beforeBuildTicks?: ScriptableFunction<void>
desc

Called before scale bulds its ticks. This hook is called separately for each scale in the chart.

param chart

The chart instance.

param args

The call arguments.

param args.scale

The scale.

param options

The plugin options.

Optional beforeDataLimits

beforeDataLimits?: ScriptableFunction<void>
desc

Called before scale data limits are calculated. This hook is called separately for each scale in the chart.

param chart

The chart instance.

param args

The call arguments.

param args.scale

The scale.

param options

The plugin options.

Optional beforeDatasetDraw

beforeDatasetDraw?: ScriptableFunction<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.

param chart

The chart instance.

param args

The call arguments.

param args.index

The dataset index.

param args.meta

The dataset metadata.

param options

The plugin options.

returns

false to cancel the chart datasets drawing.

Optional beforeDatasetUpdate

beforeDatasetUpdate?: ScriptableFunction<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.

param chart

The chart instance.

param args

The call arguments.

param args.index

The dataset index.

param args.meta

The dataset metadata.

param args.mode

The update mode.

param options

The plugin options.

returns

false to cancel the chart datasets drawing.

Optional beforeDatasetsDraw

beforeDatasetsDraw?: ScriptableFunction<boolean | void>
desc

Called before drawing the chart datasets. If any plugin returns false, the datasets drawing is cancelled until another render is triggered.

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

returns

false to cancel the chart datasets drawing.

Optional beforeDatasetsUpdate

beforeDatasetsUpdate?: ScriptableFunction<boolean | void>
desc

Called before updating the chart datasets. If any plugin returns false, the datasets update is cancelled until another update is triggered.

param chart

The chart instance.

param args

The call arguments.

param args.mode

The update mode.

param options

The plugin options.

returns

false to cancel the datasets update.

since

version 2.1.5

Optional beforeDestroy

beforeDestroy?: ScriptableFunction<void>

Called before the chart is being destroyed.

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

Optional beforeDraw

beforeDraw?: ScriptableFunction<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.

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

returns

false to cancel the chart drawing.

Optional beforeElementsUpdate

beforeElementsUpdate?: ScriptableFunction<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.

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

Optional beforeEvent

beforeEvent?: ScriptableFunction<boolean | void>
desc

Called before processing the specified event. If any plugin returns false, the event will be discarded.

param chart

The chart instance.

param args

The call arguments.

param args.event

The event object.

param args.replay

True if this event is replayed from Chart.update

param args.inChartArea

The event position is inside chartArea

param options

The plugin options.

Optional beforeInit

beforeInit?: ScriptableFunction<void>
desc

Called before initializing chart.

Optional beforeLayout

beforeLayout?: ScriptableFunction<void>
desc

Called before laying out chart. If any plugin returns false, the layout update is cancelled until another update is triggered.

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

returns

false to cancel the chart layout.

Optional beforeRender

beforeRender?: ScriptableFunction<boolean | void>
desc

Called before rendering chart. If any plugin returns false, the rendering is cancelled until another render is triggered.

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

returns

false to cancel the chart rendering.

Optional beforeTooltipDraw

beforeTooltipDraw?: ScriptableFunction<void>
desc

Called before drawing the tooltip. If any plugin returns false, the tooltip drawing is cancelled until another render is triggered.

param chart

The chart instance.

param args

The call arguments.

param args.tooltip

The tooltip.

param options

The plugin options.

returns

false to cancel the chart tooltip drawing.

Optional beforeUpdate

beforeUpdate?: ScriptableFunction<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.

returns

false to cancel the chart update.

Optional destroy

destroy?: ScriptableFunction<void>

Called after the chart has been destroyed.

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

deprecated

since version 3.7.0 in favour of afterDestroy

Optional id

id?: string

Optional install

install?: ScriptableFunction<void>
desc

Called when plugin is installed for this chart instance. This hook is also invoked for disabled plugins (options === false).

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

since

3.0.0

Optional reset

reset?: ScriptableFunction<void>
desc

Called during chart reset

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

since

version 3.0.0

Optional resize

resize?: ScriptableFunction<void>
desc

Called after the chart as been resized.

param chart

The chart instance.

param args

The call arguments.

param args.size

The new canvas display size (eq. canvas.style width & height).

param options

The plugin options.

Optional start

start?: ScriptableFunction<void>
desc

Called when a plugin is starting. This happens when chart is created or plugin is enabled.

since

3.0.0

Optional stop

stop?: ScriptableFunction<void>
desc

Called when a plugin stopping. This happens when chart is destroyed or plugin is disabled.

since

3.0.0

Optional uninstall

uninstall?: ScriptableFunction<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).

param chart

The chart instance.

param args

The call arguments.

param options

The plugin options.

since

3.0.0

Generated using TypeDoc