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.
Chart extends Plot and is the primary entry point for creating Taucharts visualizations. Pass a ChartSpec configuration object to the constructor and Taucharts automatically detects the chart type, sets up dimension metadata, and converts the config into a lower-level GPL spec before rendering. For most use cases you should use Chart rather than Plot directly.
Constructor
renderTo. When config.autoResize is true (the default), the instance is added to Chart.winAware and will resize automatically when the browser window resizes.
Configuration object that defines the chart type, data, encodings, and settings. See ChartSpec for the full field reference.
Static property
Array of all chart instances that have
autoResize enabled. Each instance in this array is resized automatically via requestAnimationFrame when a window resize event fires. Instances are removed from the array when destroy() is called.Methods
renderTo
updateConfig if you need to move the chart to a different container.
The container element, or a CSS selector string that resolves to one. Throws if the element is not found.
Optional explicit width and/or height in pixels. When omitted the chart measures the container and fills it.
getSVG
<svg> element. Returns null before renderTo has been called or when the data source is empty.
addFilter
removeFilter later.
Filter descriptor object. At minimum provide a
predicate function (row) => boolean. You can also set tag (string, for grouping) and src (string, data source key, defaults to '/').removeFilter
refresh() afterwards if needed.
The filter ID returned by
addFilter.refresh
renderTo with the same target and size as the last render.
updateConfig
resize
size overrides the automatic container measurement. Passing no arguments re-measures the container.
Optional explicit dimensions. Omit to let the chart measure its container.
getLayout
PlotLayout object containing all layout DOM elements. Useful for plugins that need to insert content into the chart’s header, footer, or sidebars.
destroy
Chart.winAware, and calls super.destroy() to clean up all event listeners.
Event system
Chart inherits the Emitter interface from Plot. All four methods below are available on every chart instance.
on
EventHandlerMap that can be passed to removeHandler for bulk unsubscription.
Event name. See lifecycle events below for the list of built-in events.
Function called when the event fires. Signature:
(sender: Emitter, data: any) => void.Optional
this context for the callback.addHandler
{ eventName: callback } pairs.
Object whose keys are event names and values are
EventCallback functions.Optional
this context applied to all callbacks in the map.removeHandler
addHandler. Pass the same map and context that were used when subscribing.
The same
EventHandlerMap object passed to addHandler.The same context passed to
addHandler.fire
Event name to emit.
Payload passed as the second argument to all listeners.
Lifecycle events
These events fire automatically during the render pipeline. Subscribe withchart.on(name, callback).
| Event | Callback signature | When it fires |
|---|---|---|
'beforerender' | (chart, svg: SVGSVGElement) | After the SVG element is created but before grammar elements are drawn |
'render' | (chart, svg: SVGSVGElement) | After all grammar elements have finished drawing |
'specready' | (chart, spec: GPLSpec) | After the live GPL spec has been built and transforms applied |
'unitsstructureexpanded' | (chart, spec: GPLSpec) | After the unit tree has been fully expanded, before drawing begins |
'renderingtimeout' | (chart, timeout: number) | When async rendering exceeds settings.renderingTimeout |
'renderingerror' | (chart, error: Error) | When settings.handleRenderingErrors is true and rendering throws |
'elementclick' | (chart, event: PointerEvent) | User clicks a chart element |
'elementmouseover' | (chart, event: PointerEvent) | Pointer enters a chart element |
'elementmouseout' | (chart, event: PointerEvent) | Pointer leaves a chart element |
'unitdraw' | (chart, unit: GrammarElement) | Each grammar unit finishes drawing |
PlotSize interface
Optional explicit width in pixels.
Optional explicit height in pixels.
PlotLayout interface
The object returned bygetLayout(). All properties are HTMLDivElement references.
The outermost container element that is appended to the target.
Area above the chart canvas. Contains the render-progress bar.
The scrollable area that holds the rendered SVG element.
Wrapper around
content used for scrollbar size compensation.Column to the left of the chart canvas. Plugins such as
legend may insert content here.Column to the right of the chart canvas.
Scrollable wrapper for
rightSidebar.Area below the chart canvas.