Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/TargetProcess/tauCharts/llms.txt

Use this file to discover all available pages before exploring further.

Taucharts has an extensible plugin system that lets you add interactive features and visual enhancements to your charts without modifying the core library. Plugins are plain objects that implement a small lifecycle interface, and they are activated by passing them in the chart configuration. The library ships with a comprehensive set of built-in plugins covering tooltips, legends, annotations, trend lines, data export, filtering, and more.

Using plugins

Pass an array to the plugins property of your chart configuration. Each entry is a plugin instance returned by calling Taucharts.api.plugins.get('name')(settings).
var chart = new Taucharts.Chart({
    type: 'scatterplot',
    x: 'age',
    y: 'score',
    color: 'group',
    data: dataset,
    plugins: [
        Taucharts.api.plugins.get('tooltip')(),
        Taucharts.api.plugins.get('legend')({ position: 'bottom' }),
        Taucharts.api.plugins.get('trendline')()
    ]
});

Getting a plugin

The Taucharts.api.plugins.get function retrieves a plugin factory by name. Call the returned factory with an optional settings object to produce a plugin instance.
var tooltipPlugin = Taucharts.api.plugins.get('tooltip')({
    fields: ['name', 'value'],
    escapeHtml: true
});

Built-in plugins

NameDescription
tooltipShows a data tooltip on hover with configurable fields and formatters
legendRenders a color, size, or fill legend with interactive category filtering
annotationsDraws annotation lines, areas, and labels on the chart
trendlineFits and draws statistical trend lines (linear, exponential, logarithmic)
export-toAdds a menu to export the chart as a PNG image or CSV file
crosshairDisplays crosshair lines that follow the cursor with axis labels
layersOverlays multiple chart series with independent Y axes
quick-filterAdds range brush filters for numeric dimensions
category-filterAdds checkbox filters for categorical dimensions
bar-as-spanRenders bars spanning between two data values instead of from zero
box-whiskersComputes and draws box-and-whisker plots from raw data
floating-axesKeeps axis labels visible when the chart is scrolled
diff-tooltipShows differences between data points in the tooltip
parallel-brushingAdds brushing interaction to parallel coordinates charts
parallel-tooltipShows tooltips on parallel coordinates charts
geomap-legendRenders a legend for geomap charts
geomap-tooltipShows tooltips on geomap charts
settingsAdds a settings panel to configure chart options at runtime

PluginObject interface

Every plugin must implement at least one of the following lifecycle methods.
var myPlugin = {
    // Called once when the chart is initialized.
    // Use this to register event handlers, modify the spec, or insert DOM elements.
    init(chart) {},

    // Called after each render cycle.
    // Use this to update DOM elements that depend on the rendered chart.
    onRender() {},

    // Called when the chart is destroyed.
    // Use this to clean up event handlers and remove DOM elements.
    destroy() {}
};
The chart argument passed to init is a Plot instance. It exposes methods such as getSpec(), getLayout(), addFilter(), removeFilter(), refresh(), and the event emitter interface (on, fire).

Registering a custom plugin

Register a reusable plugin factory under a name so other parts of the application can retrieve it with plugins.get.
Taucharts.api.plugins.add('my-plugin', function (settings) {
    settings = settings || {};
    return {
        init(chart) {
            // setup
        },
        onRender() {
            // update
        },
        destroy() {
            // cleanup
        }
    };
});

// Retrieve and use it:
var instance = Taucharts.api.plugins.get('my-plugin')({ option: true });

Plugin pages

Tooltip

Show data on hover with custom fields and formatters.

Legend

Interactive color and size legend with position control.

Annotations

Add lines, ranges, and labels to highlight data regions.

Trendline

Fit statistical trend lines to your chart data.

Export to PNG / CSV

Let users download the chart as an image or spreadsheet.

Additional plugins

Crosshair, layers, filters, bar-as-span, and box-whiskers.

Build docs developers (and LLMs) love