Skip to content

Vizzu / Modules / plugins / Plugin

Interface: Plugin

plugins.Plugin

Vizzu plugin interface.

Properties

api

• Optional api: PluginApi

Any parameter or method the Plugin exposes for the user.


enable

• Optional enable: (enabled: boolean) => void

Method called by Vizzu indicating for the plugin that it got switched on/off. If switched off, its event listeners gets removed and its hooks won't be called.

Type declaration

▸ (enabled): void

Parameters

Name Type
enabled boolean

Returns

void


hooks

• Optional hooks: PluginHooks\<Hooks>

Hooks the plugin implemenst. They work only if the plugin is enabled.


listeners

• Optional listeners: PluginListeners

Event listeners the plugin implements. They work only if the plugin is enabled.


meta

• Optional meta: PluginMeta

Metainfo about the plugin.


register

• Optional register: (ctx: Vizzu) => void

Register called when the plugin added to vizzu, receiving the Vizzu instance.

Type declaration

▸ (ctx): void

Parameters

Name Type
ctx Vizzu

Returns

void


unregister

• Optional unregister: (ctx: Vizzu) => void

Unregister is called when detach() called on the Vizzu instance.

Type declaration

▸ (ctx): void

Parameters

Name Type
ctx Vizzu

Returns

void