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.
Plot is the base class that Chart extends. It owns the rendering pipeline, the filter store, the event system, and the layout DOM structure. In the vast majority of cases you should use Chart, which auto-detects the chart type and converts a ChartSpec into the internal GPL format for you. Use Plot directly only when you need to supply a pre-built GPL spec (an object that already has sources and scales properties) and want to bypass the type-based conversion layer entirely.
Because
Chart extends Plot, every method documented here is also available on Chart instances.When to use Plot vs Chart
| Scenario | Use |
|---|---|
Standard chart types (bar, line, scatterplot, etc.) with ChartSpec | Chart |
Custom GPL spec with explicit sources and scales | Plot |
| Plugin development that operates on the base class | Plot (as a type reference) |
| All other production use | Chart |
Constructor
Plot instance. Accepts the same ChartSpec shape as Chart. Unlike Chart, Plot does not run the chart-type registry lookup: if your config looks like a GPL spec (has both sources and scales top-level properties) it is used as-is; otherwise it is passed through SpecConverter.
Configuration object. See ChartSpec for the full field reference. When passing a GPL spec directly, ensure the object has
sources and scales properties.Methods
renderTo
config.emptyContainer HTML (an empty string by default).
A DOM element or CSS selector string identifying the container. Throws
Error('Target element not found') if the selector matches nothing.Explicit
{ width?, height? } in pixels. When omitted the chart measures the container automatically.getSVG
<svg> element produced by the last render. Returns null when the chart has not yet been rendered or when the data is empty.
addFilter
An object with at minimum a
predicate: (row) => boolean function. Additional optional fields:tag— string label for grouping filters (e.g.'user','default'). Filters with the same tag are managed together.src— data source key. Defaults to'/', the primary source.
removeFilter.
removeFilter
this for chaining. Does not trigger a re-render; call refresh() separately.
The numeric ID returned by
addFilter.refresh
renderTo call. No-op if renderTo has not been called yet.
updateConfig
applyConfig, then immediately calls refresh. All existing filters are cleared when the config is applied.
Complete replacement configuration object.
resize
renderTo(currentTarget, size).
New dimensions. Omit to let the chart re-measure its container.
getLayout
PlotLayout object holding references to all structural DOM elements. See the PlotLayout interface in the Chart reference for the full field list.
destroy
Emitter base class.
Emitter methods
Plot implements the Emitter interface. All Chart instances inherit these methods.
on
EventHandlerMap suitable for removeHandler.
Event name. The Plot source defines typed overloads for
'render', 'beforerender', 'specready', 'unitsstructureexpanded', 'renderingtimeout', 'renderingerror', 'unitdraw', 'elementclick', 'elementmouseover', and 'elementmouseout'.Signature:
(sender: Emitter, data: any) => void.Optional
this binding for the callback.addHandler
Object map of
{ eventName: callback } pairs.Optional
this binding for all callbacks in the map.removeHandler
addHandler. Pass the same callbacks reference and context.
The
EventHandlerMap passed to addHandler.The context passed to
addHandler.fire
Event name.
Payload passed to each listener as the second argument.
Internal spec pipeline
Understanding the pipeline helps when writing plugins or debugging rendering issues.transformers and onUnitsStructureExpandedTransformers receives and returns a GPLSpec. Plugins hook into this pipeline by listening to the lifecycle events or implementing onRender in the PluginObject interface.