Skip to content

Type Alias: Config ​

ts
type Config = object;

Chart configuration (non-visual behavior).

Properties ​

a11y? ​

ts
optional a11y?: ConfigA11y;

Accessibility options (plan E17). Holochart only.


antialias? ​

ts
optional antialias?: boolean;

Request an antialiased WebGL context (fixed at context creation).

Default Value ​

true


ariaLabel? ​

ts
optional ariaLabel?: string;

The chart's accessible name (aria-label), read by screen readers. Empty: layout.meta.description when set, else the figure title followed by an automatic summary ("Line chart with 3 traces"). Holochart only (plan E17.1).

Default Value ​

""


debug? ​

ts
optional debug?: boolean;

Log update plans and pipeline timings to the console.

Default Value ​

false


ts
optional displaylogo?: boolean;

Accepted for Plotly compatibility and ignored: the modebar has no logo.

Default Value ​

true


displayModeBar? ​

ts
optional displayModeBar?: "hover" | true | false;

Show the modebar always (true), never (false) or on hover.

Default Value ​

"hover"


doubleClick? ​

ts
optional doubleClick?: false | "reset" | "autosize" | "reset+autosize";

What double-clicking the plot area does.

Default Value ​

"reset+autosize"


doubleClickDelay? ​

ts
optional doubleClickDelay?: number;

Maximum delay between two clicks of a double-click, in milliseconds.

Minimum: 0

Default Value ​

300


editable? ​

ts
optional editable?: boolean;

Make titles, legend, annotations and shapes editable in place (E6.7).

Default Value ​

false


edits? ​

ts
optional edits?: ConfigEdits;

Fine-grained editability, overriding editable per element.


hoverRenderer? ​

ts
optional hoverRenderer?: "dom";

How hover labels render. Only dom (positioned HTML over the canvas) exists in M1; a WebGL label renderer is planned (E5.7).

Default Value ​

"dom"


locale? ​

ts
optional locale?: string;

Locale of UI strings and number and date formats, e.g. 'de' or 'de-CH' (which falls back to de, then English). Locales come from locales or register() (@mk7s/holochart-locales ships plotly.js's).

Default Value ​

"en-US"


locales? ​

ts
optional locales?: unknown;

Locales for this chart only, by name: { de: { dictionary, format } }, in plotly.js's locale shape. Looked up before registered ones.

Default Value ​

{}


maxPixelRatio? ​

ts
optional maxPixelRatio?: number;

Upper limit of the pixel ratio that pixelRatio: "auto" takes from the display. Raise it for sharper output on 3× screens, at the cost of drawing more pixels.

Range: 0.25 – 8

Default Value ​

2


modeBarButtonsToAdd? ​

ts
optional modeBarButtonsToAdd?: unknown;

Extra modebar buttons: names of built-in buttons or custom button objects.

Default Value ​

[]


modeBarButtonsToRemove? ​

ts
optional modeBarButtonsToRemove?: readonly string[];

Names of default modebar buttons to remove.

Default Value ​

[]


pixelRatio? ​

ts
optional pixelRatio?: number | "auto";

Renderer pixel ratio. auto uses window.devicePixelRatio, up to maxPixelRatio.

Range: 0.25 – 8

Default Value ​

"auto"


powerPreference? ​

ts
optional powerPreference?: "default" | "high-performance" | "low-power";

WebGL context power preference hint.

Default Value ​

"default"


renderHover? ​

ts
optional renderHover?: AnyFunction;

Custom hover label: (points) => HTMLElement | null. Return null/undefined to use the built-in label. Not serializable (ADR-012).


responsive? ​

ts
optional responsive?: boolean;

Resize the chart when its container or the window resizes.

Default Value ​

false


scrollZoom? ​

ts
optional scrollZoom?:
  | "cartesian"
  | "scene"
  | "geo"
  | "map"
  | `${"cartesian" | "scene" | "geo" | "map"}+${string}`
  | true
  | false;

Which subplot kinds zoom on mouse wheel. true/false enable/disable all of them.

Default Value ​

"scene+geo+map"


sharedRenderer? ​

ts
optional sharedRenderer?: "auto" | true | false;

Draw through one WebGL context shared by every chart on the page instead of a context per chart (browsers keep about 16, fewer on mobile). auto gives the first 4 charts a context of their own and shares for the rest. false always takes a context.

Default Value ​

"auto"


staticPlot? ​

ts
optional staticPlot?: boolean;

Render once with no interactivity (no hover, zoom or modebar).

Default Value ​

false


strict? ​

ts
optional strict?: boolean;

Throw on the first validation error instead of warning (once per attribute path).

Default Value ​

false


textRenderer? ​

ts
optional textRenderer?: "webgl" | "dom";

Render text as WebGL SDF glyphs or as a DOM overlay (ADR-005).

Default Value ​

"webgl"


toImageButtonOptions? ​

ts
optional toImageButtonOptions?: ConfigToImageButtonOptions;

Options for the modebar "download image" button.


topojsonURL? ​

ts
optional topojsonURL?: string;

Where the geo package fetches basemap files from (<url>/world_110m.json, …), in Plotly's topojson layout. Empty (the default) uses the data bundled with the package and fetches nothing; Plotly itself defaults to its CDN.

Default Value ​

""


worker? ​

ts
optional worker?: true | false | "auto";

Run the calc stage in a Web Worker (ADR-011). auto switches on above a data-size threshold.

Default Value ​

false

Released under the MIT License.