Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Plugins

Cal-heatmap can be customized further with the help of plugins.

Below are the built-in plugins shipped with Cal-Heatmap

These plugins are not included in the main bundled, and have to be loaded separatly, alongside their dependencies. See each plugin documentation for details.

interface PluginOptions {}
// IPluginContructor is the plugin's class
type PluginDefinition = [IPluginContructor, PluginOptions?];

cal.paint(options: Options, plugins?: PluginDefinition[] | PluginDefinition),

Usage

Example

const cal = new CalHeatmap();
cal.paint({}, [[Legend], [Tooltip, { text: t => `${new Date(t)}` }]]);

See each plugin documentation for install and usage details.


Table of contents