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.

globalSettings is a plain object on Taucharts.api that acts as the default ChartSettings for every chart created in the page. Mutate its properties once at startup and all subsequent charts inherit those defaults. Individual charts can override any setting via their own settings property.

Accessing global settings

// Read a setting
const speed = Taucharts.api.globalSettings.animationSpeed; // 750

// Write a setting
Taucharts.api.globalSettings.animationSpeed = 300;
Set global settings before creating any charts. Changes made after a chart is constructed have no effect on that chart instance.

All settings

Rendering

animationSpeed
number
default:"750"
Duration of transition animations in milliseconds. Set to 0 to disable animations.
renderingTimeout
number
default:"10000"
Maximum time in milliseconds to wait for an async render cycle before aborting.
asyncRendering
boolean
default:"true"
When true, chart rendering is deferred to the next event loop tick, keeping the UI responsive during initial paint.
syncRenderingInterval
number
default:"50"
Interval in milliseconds between synchronous rendering chunks when asyncRendering is false.
syncPointerEvents
boolean
default:"false"
When true, pointer event handlers are executed synchronously instead of being debounced.
handleRenderingErrors
boolean
default:"false"
When true, rendering errors are caught and logged instead of thrown. Useful in production environments.

Data

excludeNull
boolean
default:"true"
Exclude data rows where the mapped field value is null or undefined before rendering.
defaultFormats
object
A map from dimension type strings to format names. Used as fallback formatters when no tickFormat is set in guide.
defaultFormats: {
  measure: 'x-num-auto',
  'measure:time': 'x-time-auto'
}
utcTime
boolean
default:"false"
When true, all time and period scales use UTC methods instead of local time. Also controls which variant of x-time-auto is resolved.

Layout and sizing

fitModel
string
default:"\"normal\""
Controls how the chart fills its container. One of:
ValueBehaviour
'none'No automatic sizing
'normal'Default layout with auto margins
'entire-view'Stretches plot to fill the entire container
'minimal'Minimizes whitespace
'fit-width'Stretches horizontally only
'fit-height'Stretches vertically only
layoutEngine
string
default:"\"EXTRACT\""
Internal layout algorithm. 'EXTRACT' pulls axes out of the plot area; 'NONE' renders axes inline.
autoRatio
boolean
default:"true"
Automatically compute aspect ratios for chart elements based on available space.
minChartWidth
number
default:"300"
Minimum chart width in pixels below which rendering is suppressed.
minChartHeight
number
default:"200"
Minimum chart height in pixels below which rendering is suppressed.
minFacetWidth
number
default:"150"
Minimum width in pixels for each facet cell in a faceted chart.
minFacetHeight
number
default:"100"
Minimum height in pixels for each facet cell in a faceted chart.
facetLabelDelimiter
string
default:"\" → \""
Separator string used between facet label segments in nested facet titles (Unicode right arrow \u2192).

Spec engine

specEngine
array
Ordered list of spec engine configurations. Each entry defines a viewport threshold below which that engine is selected.Default:
specEngine: [
  { name: 'COMPACT', width: 600, height: 400 },
  { name: 'AUTO',    width: Number.MAX_VALUE, height: Number.MAX_VALUE }
]
COMPACT optimises label density for small containers. AUTO uses the full layout algorithm.

Logging

log
function
Custom log handler called by Taucharts internals for warnings and errors.
log: (msg: string, type: 'ERROR' | 'WARNING' | 'INFO' | 'LOG') => void
Default implementation forwards to console[type.toLowerCase()].

Example: applying common defaults

// Apply before any charts are created
Taucharts.api.globalSettings.animationSpeed = 300;
Taucharts.api.globalSettings.utcTime = true;
Taucharts.api.globalSettings.fitModel = 'entire-view';
Taucharts.api.globalSettings.excludeNull = false;
Taucharts.api.globalSettings.defaultFormats = {
  measure: 'x-num-auto',
  'measure:time': 'month-utc'
};

Per-chart override

Pass a settings object in ChartSpec to override global defaults for a single chart. Any property not present in settings falls back to globalSettings:
new Taucharts.Chart({
  type: 'line',
  x: 'date',
  y: 'value',
  data: [...],
  settings: {
    animationSpeed: 0,       // disable animation for this chart only
    utcTime: false,          // local time even if global is UTC
    fitModel: 'fit-width'
  }
});

Build docs developers (and LLMs) love