Skip to content

Config options ​

Attributes of config: per-chart behavior such as responsiveness, interaction and the modebar. Config is not part of the figure style and is never templated.

Generated from the attribute schema (48 entries). Machine-readable: plot-schema.json.

Attribute tree

responsive boolean ​

Resize the chart when its container or the window resizes.

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

staticPlot boolean ​

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

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

displayModeBar enumerated ​

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

  • Type: enumerated
  • Values: "hover" | true | false
  • Default: "hover"
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

modeBarButtonsToRemove info_array ​

Names of default modebar buttons to remove.

  • Type: info_array [string, …], any length
  • Default: []
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

modeBarButtonsToAdd any ​

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

  • Type: any
  • Default: []
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

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

  • Type: boolean
  • Default: true
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

scrollZoom flaglist ​

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

  • Type: flaglist
  • Flags: "cartesian", "scene", "geo", "map" (combine with +)
  • Also accepts: true | false
  • Default: "scene+geo+map"
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

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.

  • Type: string
  • Default: ""
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

doubleClick enumerated ​

What double-clicking the plot area does.

  • Type: enumerated
  • Values: false | "reset" | "autosize" | "reset+autosize"
  • Default: "reset+autosize"
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

doubleClickDelay number ​

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

  • Type: number ≥ 0
  • Default: 300
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

editable boolean ​

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

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

edits ​

Fine-grained editability, overriding editable per element.

  • Type: object
  • Edit type: plot (inherited)

edits.annotationPosition boolean ​

Drag annotations.

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

edits.annotationTail boolean ​

Drag annotation arrow tails.

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

edits.annotationText boolean ​

Edit annotation text.

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

edits.axisTitleText boolean ​

Edit axis titles.

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

edits.colorbarPosition boolean ​

Drag colorbars.

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

edits.colorbarTitleText boolean ​

Edit colorbar titles.

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

edits.legendPosition boolean ​

Drag the legend.

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

edits.legendText boolean ​

Edit trace names in the legend.

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

edits.shapePosition boolean ​

Drag and resize shapes.

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

edits.titleText boolean ​

Edit the figure title.

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

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).

  • Type: string (non-empty)
  • Default: "en-US"
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

locales any ​

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

  • Type: any
  • Default: {}
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

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).

  • Type: string
  • Default: ""
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

a11y ​

Accessibility options (plan E17). Holochart only.

  • Type: object
  • Edit type: plot (inherited)

a11y.summaries boolean ​

Add generated summaries of trends and extremes ("Revenue rises from 1.2M in Jan to 3.4M in Dec") to what screen readers get. Their code loads after the first draw. Holochart only (plan E17.2).

  • Type: boolean
  • Default: true
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

a11y.dataTable enumerated ​

The traces' data tables: 'hidden' for screen readers only (first 100 rows), 'visible' shown below the chart with every row (virtualized), false none. Holochart only (plan E17.3).

  • Type: enumerated
  • Values: "hidden" | "visible" | false
  • Default: "hidden"
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

a11y.patterns boolean ​

Give bars, histograms, polar bars, filled areas (fillpattern) and pie slices a distinct pattern each, as an encoding redundant with color, unless the trace or template sets one. Holochart only (plan E17.5).

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

a11y.reducedMotion enumerated ​

Snap transitions and drill-down tweens instead of animating them: 'auto' when the user's system asks for reduced motion (the prefers-reduced-motion media query), true always, false never. Holochart only (plan E17.5).

  • Type: enumerated
  • Values: "auto" | true | false
  • Default: "auto"
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

a11y.keyboard boolean ​

Keyboard access: Tab reaches the plot area (the arrows step through the data, + / - zoom) and the legend items. Holochart only (plan E6.5, E17.4).

  • Type: boolean
  • Default: true
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

toImageButtonOptions ​

Options for the modebar "download image" button.

  • Type: object
  • Edit type: plot (inherited)

toImageButtonOptions.format enumerated ​

Image format.

  • Type: enumerated
  • Values: "png" | "jpeg" | "webp"
  • Default: "png"
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

toImageButtonOptions.filename string ​

File name.

  • Type: string (non-empty)
  • Default: "newplot"
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

toImageButtonOptions.width number ​

Width in CSS pixels (defaults to the chart).

  • Type: number ≥ 1
  • Default: none
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

toImageButtonOptions.height number ​

Height in CSS pixels (defaults to the chart).

  • Type: number ≥ 1
  • Default: none
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

toImageButtonOptions.scale number ​

Resolution multiplier.

  • Type: number ≥ 0
  • Default: 1
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

pixelRatio number ​

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

  • Type: number from 0.25 to 8, or "auto"
  • Default: "auto"
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

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.

  • Type: number from 0.25 to 8
  • Default: 2
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

antialias boolean ​

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

  • Type: boolean
  • Default: true
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

powerPreference enumerated ​

WebGL context power preference hint.

  • Type: enumerated
  • Values: "default" | "high-performance" | "low-power"
  • Default: "default"
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

sharedRenderer enumerated ​

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.

  • Type: enumerated
  • Values: "auto" | true | false
  • Default: "auto"
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

worker enumerated ​

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

  • Type: enumerated
  • Values: true | false | "auto"
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

hoverRenderer enumerated ​

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

  • Type: enumerated
  • Values: "dom"
  • Default: "dom"
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

renderHover function ​

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

  • Type: function (not serializable)
  • Default: none
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

textRenderer enumerated ​

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

  • Type: enumerated
  • Values: "webgl" | "dom"
  • Default: "webgl"
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

strict boolean ​

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

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

debug boolean ​

Log update plans and pipeline timings to the console.

  • Type: boolean
  • Default: false
  • Array OK: no
  • Edit type: plot (inherited)
  • Animatable: no

Released under the MIT License.