@mk7s/holochart-core
Classes
| Class | Description |
|---|---|
| HolochartError | Base class of the errors holochart throws or rejects with on purpose (S1.8, S2.4): error instanceof HolochartError. |
| ValidationError | Thrown by supply-defaults in config.strict mode, carrying the first issue. |
Interfaces
| Interface | Description |
|---|---|
| AnyFigure | A figure of any shape, as the pipeline takes it (supplyDefaults, diffFigures, encodeFigure, …): every part is validated, so nothing is assumed. Every FigureInput is one. |
| AnyOptions | Options for any. |
| AttrBuilders | The builders of the schema DSL (attr), one per attribute type and container. |
| AttrConstraints | Constraint fields for leaf attributes. Which fields apply depends on valType; builders in attr.ts only expose the relevant ones. |
| AttrSpec | A leaf attribute. |
| AxisExtremes | What one trace contributes to one axis' autorange. |
| BaseLayoutTitle | Figure title. |
| BooleanOptions | Options for boolean. |
| BreakMap | The compressed linear space of an axis with range breaks (see the module docs). Raw values are ms since the epoch (UTC) on date axes and plain numbers on linear axes. |
| CalendarSystem | A non-Gregorian calendar used to interpret the date part of date strings (the xcalendar, ycalendar, … attributes; world calendars are plan E3). |
| Children | Child map of a container node. |
| ColorlistOptions | Options for colorlist. |
| ColorOptions | Options for color. |
| ColorscaleGroup | One named group of built-in colorscales (for docs and pickers). |
| ColorscaleOptions | Options for colorscale. |
| ConfigA11y | Accessibility options (plan E17). Holochart only. |
| ConfigEdits | Fine-grained editability, overriding editable per element. |
| ConfigToImageButtonOptions | Options for the modebar "download image" button. |
| CoreComponentModule | A layout component (legend, annotations, shapes, …) contributing layout attributes. Components are always active, unlike trace-module layout attributes. |
| CoreTraceModule | A trace type (plan §4.4). schema is the single source of truth for the trace's own attributes; common attributes (visible, name, opacity, …, and xaxis/yaxis for cartesian traces) are added by the registry. |
| EncodedFigure | A figure encoded by encodeFigure. Keys the input figure did not set are absent. |
| EncodedTypedArray | What encodeTypedArray produces: a TypedArraySpec with a base64 string. |
| EncodeFigureOptions | Options for encodeFigure. |
| EnumeratedOptions | Options for enumerated. |
| ExtremePoint | A data extreme a trace contributes to autorange, with the pixel padding it needs (marker size). |
| ExtrusionBevel | Rounded edges of extruded shapes (with depth). |
| ExtrusionMaterial | The material of extruded shapes (with depth): Plotly figures keep the default, plotly. |
| FigureDiff | Result of diffFigures. |
| FigureInput | A figure as passed by the user (plan ADR-001). |
| FlaglistOptions | Options for flaglist. |
| FrameInput | An animation frame (figure.frames[i], addFrames): trace and layout changes applied as one step, like Plotly's frames. |
| FullItemExtras | Fields added to every item of an ItemsNode in the full output. |
| FullTrace | A trace after defaults. Module-specific attributes are reached through the index signature. |
| InfoArrayOptions | Options for infoArray. |
| Issue | One problem found in a figure. |
| ItemsNode | An array of objects (annotations, shapes, …) that supports templateitemname. |
| ItemsOptions | Options for items. |
| LayoutDefaultsContext | Helpers passed to layout-level supplyLayoutDefaults hooks. |
| LayoutFont | Global font. Every text element inherits unset font fields from here. |
| LayoutGrid | A grid of subplots (Plotly layout.grid). Cartesian axes placed in the grid get their domain, anchor, side and position defaults from their cell; domain traces (pie, …) are placed with domain.row / domain.column. Values given on an axis or a trace always win. |
| LayoutGridDomain | The part of the plot area the grid fills. |
| LayoutMargin | Space around the plot area. |
| LayoutSelection | One item of selections. |
| LayoutSelectionLine | Outline style. |
| LayoutTitleFont | Title font. Defaults to layout.font with 1.4× size. |
| LayoutTransition | Default transition for animated updates (E7.3). |
| LayoutUniformtext | Uniform text sizing for bar and pie labels (E4.6). |
| LayoutXaxis | A x axis. xaxis2, xaxis3, … declare further x axes, referenced from traces as 'x2', 'x3', …. |
| LayoutXaxisAutorangeoptions | Constraints applied to the computed autorange. |
| LayoutXaxisMinor | Minor ticks and grid lines between the major ticks. |
| LayoutXaxisRangebreak | One item of rangebreaks. |
| LayoutXaxisRangeselector | Range selector (plan E5.9): buttons over the chart that set the x range to a preset span ending at the current range end (last 6 months, year to date, all). Date axes only. The button whose range is in view shows as active. |
| LayoutXaxisRangeselectorButton | One item of buttons. |
| LayoutXaxisRangeselectorFont | Button font. Defaults to layout.font. |
| LayoutXaxisRangeslider | Range slider (plan E5.9): an overview of all the data under the x axis, with a window over the range in view. Drag the window to pan, its ends to zoom, or click elsewhere to center the window there; the axis range changes with one relayout at the end of the drag. Y axes anchored to an axis with a range slider default to fixedrange: true, as in Plotly. |
| LayoutXaxisRangesliderYaxis | Thumbnail y range per y axis: yaxis for the subplot on y, yaxis2 for y2, … (one thumbnail per subplot on this x axis, drawn over each other). |
| LayoutXaxisTickfont | Tick-label font. Defaults to layout.font. |
| LayoutXaxisTickformatstop | One item of tickformatstops. |
| LayoutXaxisTitle | Axis title. |
| LayoutXaxisTitleFont | Axis title font. Defaults to layout.font with 1.2× size. |
| LayoutYaxis | A y axis. yaxis2, yaxis3, … declare further y axes, referenced from traces as 'y2', 'y3', …. |
| LayoutYaxisAutorangeoptions | Constraints applied to the computed autorange. |
| LayoutYaxisMinor | Minor ticks and grid lines between the major ticks. |
| LayoutYaxisRangebreak | One item of rangebreaks. |
| LayoutYaxisTickfont | Tick-label font. Defaults to layout.font. |
| LayoutYaxisTickformatstop | One item of tickformatstops. |
| LayoutYaxisTitle | Axis title. |
| LayoutYaxisTitleFont | Axis title font. Defaults to layout.font with 1.2× size. |
| Locale | A chart's resolved locale (fullLayout._locale): the translation function and the formatters every label, tick and hover text goes through. |
| LocaleDefinition | The translatable content of a locale: UI strings and (partial) formats. |
| LocaleFormat | Number and date formats of a locale (plotly.js's format object, all keys resolved). |
| LocaleModule | A locale module, as register() takes it — the shape of plotly.js's lib/locales/*.js, so a Plotly locale registers unchanged. |
| LocaleStore | Where registered locales live: the core registry keeps one of these per chart registry. |
| MakeSubplotsOptions | Options for makeSubplots. Names follow Python's make_subplots in camelCase. |
| MakeSubplotsResult | Result of makeSubplots. |
| NodeMeta | Metadata shared by every schema node (leaves and containers). |
| NumberOptions | Options for number, integer and angle. |
| ObjectNode | A nested container (e.g. marker, layout.margin). |
| PlacedTrace | What MakeSubplotsResult.place sets on a trace. |
| PlaceOptions | Options for MakeSubplotsResult.place. |
| PlanOptions | Options for planUpdate. |
| PlotSchema | The whole-library schema document. |
| Registry | Holds trace modules, components and named templates for a set of charts. Keeping this an explicit object (rather than module-level state) keeps core pure and lets tests and apps run isolated registries side by side. |
| ResolvedTemplate | Result of resolving layout.template. |
| Scale | - |
| SerializeWarning | A warning reported through EncodeFigureOptions.onWarning. |
| StringOptions | Options for string. |
| StyleCondition | A condition on a point. Keys are fields of the trace ('y', 'text', 'marker.size', 'customdata[1]', or 'pointNumber', the point's index) holding StyleOperators or a value (shorthand for eq). Several fields must all hold; and, or and not combine conditions. |
| StyleOperators | Operators on one field. Several operators on one field must all hold. |
| StylePoint | What a style function gets for each point (plan E8.6): the point's value in each of the trace's data arrays (x, y, z, customdata, ids, …) and in its top-level per-point arrays such as text (dataset '@column' references resolved), and its index. |
| StyleRule | A serializable style rule (plan E8.5): per-point attributes ('marker.color', 'marker.size', 'text', … — any arrayOk attribute of the trace) set on the points matching when. Later rules win over earlier ones; points no rule matches keep the trace's own value. |
| SubplotCell | A subplot of the grid, as built by makeSubplots. |
| SubplotIdOptions | Options for subplotId. |
| Subplots | Subplots discovered during supply-defaults (plan E1.4). |
| SubplotSpec | One cell of specs: the subplot in that cell (null for an empty cell). |
| SupplyDefaultsOptions | Options for supplyDefaults. |
| SupplyDefaultsResult | Output of supplyDefaults. |
| Template | A figure template. |
| TemplatedItemChildren | Children added to every item of an items node so templates can target them. |
| TemplateSource | Where named templates are looked up (implemented by the registry). |
| Tick | One tick mark (plan E3.3). |
| TraceAxisHints | What a cartesian trace asks of its axes, beyond holding its data (see CoreTraceModule.axisHints). Every field is a default: what the figure sets on an axis wins, and so does another trace that shows the axis. A trace in a 3D scene asks the same of its scene's three axes (hide: true, and x / y / z; a scene has its own aspectmode). |
| TraceDefaultsContext | Helpers passed to a trace module's supplyDefaults. |
| TraceDomain | Where this trace is drawn, as a part of the plot area. |
| TraceHoverlabel | Hover label style for this trace. Unset fields fall back to layout.hoverlabel (so there are no trace-level defaults). |
| TraceHoverlabelFont | Label font. |
| TraceLegendgrouptitle | Title of the legend group this trace belongs to. |
| TraceLegendgrouptitleFont | Group title font. Unset fields come from legend.grouptitlefont. |
| TraceMatch | A trace present in both figures: index from in the previous data, to in the next. |
| TraceMatching | How the traces of two figures correspond (see matchTraces). |
| TraceModuleMeta | Docs metadata for a trace module. |
| TypedArraySpec | A typed array encoded for JSON. |
| ValidateOptions | Options for validate. |
Type Aliases
| Type Alias | Description |
|---|---|
| AnyFunction | A function-valued attribute (non-serializable, ADR-012). |
| AttrRole | Docs grouping tag for an attribute. |
| AxisType | - |
| BaseLayout | Figure layout. |
| CartesianTraceAttributes | Attributes of traces drawn on cartesian axes: the axes they use. |
| Change | A changed attribute: a trace attribute (of a given type) or a layout attribute. |
| ColorScale | A colorscale: a named scale ('Viridis') or [position, color] stops from 0 to 1. |
| ColorscaleInput | A colorscale to register: [position, color] stops from 0 to 1, or evenly spaced colors. |
| ColorscaleKind | How a built-in colorscale is meant to be used. |
| ColorscaleStops | A colorscale as [position, CSS color] stops, positions from 0 to 1 in order. |
| CommonTraceAttributes | Attributes every trace type has (name, visible, hovertemplate, …). |
| Config | Chart configuration (non-visual behavior). |
| DataArray | A column of data: a plain array (numbers, strings, Dates, …) or a typed array. |
| DataArrayOptions | Options for dataArray. |
| DataColumn | A trace's data attribute (x, y, z, customdata, …): a column of values or a dataset column. |
| DatasetRef | A reference to a column of the figure's datasets (plan E1.6), e.g. '@revenue' with dataset: 'sales' on the trace. |
| DecodedArray | A decoded 2D or 3D spec: rows of typed arrays (views of one buffer), as plotly.js returns. |
| DomainTraceAttributes | Attributes of traces placed by a fraction of the plot area (pie, treemap, …). |
| Dtype | The dtypes encodeTypedArray writes; the same set plotly.js reads. |
| EditFlag | One edit-type flag. See EDIT_FLAGS. |
| EditType | An attribute's edit type: a single flag or a combination of flags. |
| Extent | An extent [start, end] in plot-area fractions. |
| ExtrusionAttributes | 2.5D attributes (Holochart extension) of the traces the full bundle extrudes (bar, pie, …). Partial bundles add them with core's withExtrusion. |
| FullAxis | A defaulted (minimal, M0) cartesian axis. |
| FullConfig | The config after defaults. |
| FullGrid | layout.grid after defaults (plan E4.4, defaults/grid.ts). Present only for a grid of more than one cell; subplots (grid of independent subplots) or xaxes/yaxes hold the cell contents that were found. |
| FullLayout | The layout after defaults. Axes exist only for discovered subplots; module and component layout attributes are reached through the index signature. |
| FunctionOptions | Options for fn. |
| InferFull | The type of a schema node after defaults. Attributes with a dflt are always present; attributes without one may be undefined. Containers are always present. Trace modules with conditional defaults (e.g. marker only when mode includes markers) document where that guarantee is weaker. |
| InferInput | The input type accepted by a schema node. |
| IssueCode | What kind of problem an issue describes. |
| JSONSchemaNode | JSON form of any schema node. |
| JSONValue | Any value JSON.parse can return. |
| LayoutInput | A layout as FigureInput takes it by default: the base layout attributes (axes, margins, …) typed, and any other attribute (those of registered components and traces, such as legend or barmode) accepted as it is. The full bundle's Layout types those too. title takes the attributes the title component adds (subtitle, pad, …). |
| LocaleDefinitions | Per-chart locales (config.locales), keyed by name as the user wrote them. |
| PerPoint | A per-point (arrayOk) trace attribute: one value for every point, one value per point (null for a point without one; rows of values for the cells of a grid, such as a heatmap's text or a table's columns), a style function (plan E8.6) or a dataset column ('@column'). |
| PerPointColor | A per-point (arrayOk) color, such as marker.color: a CSS color, or per point a color or a number (mapped through the trace's colorscale), a typed array of numbers, or a style function. A dataset column is a '@column' string. |
| PerPointNumber | A per-point (arrayOk) number, such as marker.size: PerPoint, or a typed array. |
| PointStyleFunction | A style function (plan E8.6) as a per-point attribute takes it: called with a StylePoint (the point's value in each data array, and pointNumber), its index and the input trace. Declare the fields it reads: (p: { y: number }) => (p.y > 10 ? 'gold' : 'gray'). |
| PrimitiveValue | Values allowed in enumerated.values and flaglist.extras. |
| ReducedMotion | config.a11y.reducedMotion: 'auto' follows the user's prefers-reduced-motion. |
| RGBAColor | sRGB 0–1 RGBA, alpha not premultiplied — the render layer's color format. |
| SchemaNode | Any schema node. |
| SerializeWarningCode | Why encodeFigure changed or dropped a value. |
| SharedAxes | Axis sharing: true shares along the natural direction (x per column, y per row); 'columns', 'rows' and 'all' name the group explicitly. See makeSubplots for the limits. |
| Stage | A pipeline stage an update can trigger. |
| StyleFunction | A style function (plan E8.6, ADR-012) on a per-point (arrayOk) attribute, e.g. marker: { color: (p) => (p.y > 10 ? 'gold' : 'gray') }. It is called once per point with the point, its index and the input trace, and behaves exactly like the array of its results. Not serializable: chartToJSON() stores the evaluated array (with a warning). |
| StyleValue | A value a condition compares against: numbers, strings (ISO dates compare as dates), booleans. |
| SubplotType | Subplot types a SubplotSpec can name. |
| SupportedSubplotType | The subplot types makeSubplots can build today. |
| TraceCategory | Trace categories drive shared behavior: cartesian traces get xaxis/yaxis attributes and take part in axis discovery; domain traces get domain.{x, y, row, column} and are placed by a fraction of the plot area or a layout.grid cell (E4.5); showLegend traces count towards the legend default. |
| TraceInput | A trace of any type, as a registry that does not know it accepts it: the loose default of FigureInput. Any object fits, so partial bundles, plugins and data from untyped sources (JSON, Express) work; the full bundle's Figure (@mk7s/holochart) types every built-in trace instead, and each trace package exports its own trace types (ScatterTrace, TracesBasic, …). |
| TypedArray | Any JS typed array except BigInt64Array/BigUint64Array (charts deal in doubles). |
| TypedArrayConstructor | A typed array constructor (TypedArray). |
| ValType | A value type understood by coercion and validation. |
Variables
| Variable | Description |
|---|---|
| attr | The schema DSL. Each builder returns a plain, JSON-like object, so schemas can be inspected, merged and serialized to plot-schema.json. |
| BUILTIN_COLORSCALE_GROUPS | Every built-in colorscale group, in registration (priority) order. plotly.js's names come first, so a later group with the same name (plotly.py's ColorBrewer Blues) never changes what the string means; those lists stay available as values (e.g. COLORBREWER_SEQUENTIAL.Blues). |
| BUILTIN_PALETTES | The built-in qualitative palettes (plotly.py plotly.colors.qualitative), by name. |
| cartesianTraceAttributes | Attributes added to traces in the cartesian category. |
| CARTO_DIVERGING | CARTOColors diverging scales by name. |
| CARTO_SEQUENTIAL | CARTOColors sequential scales by name. |
| CMOCEAN_CYCLICAL | cmocean cyclical scales by name. |
| CMOCEAN_DIVERGING | cmocean diverging scales by name. |
| CMOCEAN_SEQUENTIAL | cmocean sequential scales by name. |
| COLORBREWER_DIVERGING | ColorBrewer diverging scales by name. |
| COLORBREWER_SEQUENTIAL | ColorBrewer sequential scales by name. |
| colors | The colorscale registry as one object (Holochart.colors.register('Brand', stops), plan E8.2). |
| colorways | The colorway (qualitative palette) registry as one object: colorways.get('Dark24'). |
| commonTraceAttributes | Attributes every trace has. |
| configSchema | The config schema. |
| CYCLICAL | plotly.py cyclical scales by name. |
| DIVERGING_PLOTLY | plotly.js-derived diverging scales (plotly.colors.diverging). |
| domainTraceAttributes | Attributes added to traces in the domain category (plan E4.5; Plotly's plots/domain.js): pie, and later sunburst, treemap, funnelarea, indicator, … are placed by a fraction of the plot area instead of axes. row / column pick a layout.grid cell, which then gives the default x / y; without a grid they are dropped. |
| EDIT_FLAGS | Edit-type flags (plan E1.7). Each attribute declares which pipeline stages a change to it invalidates, so updates re-run only what is needed. |
| extrusionAttributes | depth, bevel and material of extrudable 2D traces (plan E8.9; see the module comment). Spread into a trace schema; call supplyExtrusionDefaults from its supplyDefaults. |
| FACET_LABEL_NAME | name of the facet labels Express adds (day=Sat above a facet column, time=Dinner at the right of a facet row): like SUBPLOT_TITLE_NAME, those above the top row push the top margin (a top legend sits above them), but they keep layout.font's size, as px's facet labels. |
| HOLOCHART_COLORWAY | Colorway of the default look: saturated mid-luminance hues, ordered so neighbours differ in hue (red, blue, indigo, emerald, orange, teal, gold, magenta), each legible as a 1.25 px line on the #0a0a0f background. |
| HOLOCHART_FONT_FAMILY | Font family of the default look. Charts draw it with the first family that is registered (fonts.register) and otherwise with the renderer's bundled default font. |
| holochartTemplate | Holochart's default look (ADR-021): a dark, dense chart. #0a0a0f paper and plot area, a faint #1a1a22 grid, #2c2c38 axis lines with short outside ticks, 9 px text (8 px tick labels, an 11 px left-aligned title) in Helvetica Neue, tight margins that axes, the title and the legend grow as needed (automargin; the title and a top legend stack, and a 4 px gutter keeps grown margins' content off the edge), a transparent horizontal legend above the plot area, dark hover labels, thin lines and small markers, borderless bars, slim colorbars, tables with a raised header and faint rules. |
| layoutSchema | The base layout schema. Registry-merged with trace-module and component layout attributes. |
| noneTemplate | The empty template (plotly.py's none): schema defaults only, i.e. Plotly's look. |
| plotlyClassicTemplate | Plotly's look, spelled out: the library's schema defaults (white paper and plot area, #444 text in Open Sans 12 px, the D3 category10 colorway, a light #eee grid, Plotly's automatic colorscales Reds / Blues / RdBu). layout.template: 'plotly-classic' renders exactly what layout.template: 'none' (or null) renders; unlike none it can be the base of a composition (composeTemplates(plotlyClassicTemplate, …)). |
| PLOTLYJS_COLORSCALES | Plotly.js's named colorscales, by their canonical names. |
| QUALITATIVE | All qualitative sequences by plotly.py name. |
| SEQUENTIAL | plotly.py's own sequential scales by name. |
| VAL_TYPES | Every value type understood by coercion and validation. |
| xaxisSchema | Cartesian x-axis schema (plan E3): the axis attributes plus the range slider and selector. |
| yaxisSchema | Cartesian y-axis schema (plan E3). |
Functions
| Function | Description |
|---|---|
| canonicalColor | Parse any CSS color and return its canonical rgb()/rgba() string, or null if value is not a valid color. 'transparent' becomes rgba(0, 0, 0, 0). |
| colorscaleNames | Names of every resolvable colorscale (registered and plotly.js built-ins), without _r. |
| colorwayNames | Names of every registered colorway, and Safe. |
| composeTemplates | Compose templates left to right; later templates win. Layout is deep-merged (arrays replaced); per-type trace lists are merged element-wise so both templates' cycles survive. |
| createRegistry | Create an empty registry. Trace packages register their modules into it; the full bundle creates one shared registry. |
| decodeFigure | Decode a figure encoded by encodeFigure (or by Plotly): every { dtype, bdata, shape? } spec, anywhere in the figure, becomes a typed array again (a 2D shape gives an array of row typed arrays, as plotly.js does). ISO date strings stay strings, which Holochart accepts wherever it accepts dates. Accepts the JSON text or the parsed value; the input is never mutated. |
| decodeTypedArray | Decode a TypedArraySpec. 1D specs give one typed array; shape: 'rows,cols' gives an array of rows typed arrays (row-major views of one buffer, as plotly.js returns), and a 3D shape an array of such arrays. Throws on an unknown dtype, invalid base64, a byte length that is not a whole number of elements, or a shape that does not match the data. |
| diffFigures | Diff two figure inputs (plan E1.8). Never mutates its arguments and never reads the contents of data arrays, so its cost is proportional to the size of the spec, not of the data. |
| encodeFigure | Encode an input figure as JSON-safe data: JSON.parse(JSON.stringify(out)) deep-equals out. The input is never mutated. |
| encodeTypedArray | Encode a typed array (only the view's own elements, whatever its byteOffset) as { dtype, bdata }. Bits are preserved exactly, so NaN, -0 and ±Infinity survive. |
| evenStops | Evenly spaced stops from a list of colors. |
| fontSchema | Font attributes without defaults. Containers like title.font inherit unset fields from layout.font during supply-defaults. |
| formatDate | Format milliseconds since the epoch as the shortest ISO-style UTC string that parseDate reads back to the same value, Plotly-style: 2024-03-01, 2024-03-01 12:30, 2024-03-01 12:30:05, 2024-03-01 12:30:05.25. |
| formatIssue | Format an issue for console output. |
| getColorscale | The stops of a named colorscale ('Viridis', 'viridis_r'), or undefined for unknown names. The result is shared: do not mutate it. |
| getColorway | A named colorway's colors (case-insensitive), or undefined. Safe (CARTO's colorblind-safe palette, plan E17.5) is always available, like plotly.js's colorscale names; registering a colorway of that name replaces it. Shared: do not mutate. |
| isColorscaleName | Whether name resolves to a colorscale (including _r variants). |
| isDateString | True if v is an ISO-8601-style date string. |
| isValidColor | True if value is a string d3-color can parse. |
| isValidDate | True for valid Date instances. |
| litMaterialAttributes | The material attribute (Holochart extension, E8.7): shared by the 3D traces (sceneMaterialAttributes) and extruded 2D traces (extrusionAttributes). description describes the container. Unset parameters keep the three.js material's defaults. |
| makeSubplots | Build a subplot grid like Python's make_subplots: axis domains, anchors and title annotations for rows × cols cells, and a place helper for traces. |
| parseDate | Convert a date value to milliseconds since the Unix epoch (UTC). |
| planRelayout | Plan a relayout: every attribute path in update. |
| planRestyle | Plan a restyle: every attribute path in update applied to the given traces. |
| planUpdate | Merge the edit flags of every changed path into the set of stages to run. |
| plotSchema | Build the whole-library schema document from a registry (plan E1.1 plot-schema.json). |
| registerBuiltinColors | Register every built-in colorscale name (plan E8.2: plotly.py's sequential, diverging and cyclical scales, cmocean, CARTO and ColorBrewer; about 100 names plus their _r variants) and every qualitative palette as a colorway. Names already registered keep their meaning. Idempotent. |
| registerColorscale | Register a named colorscale (replacing any scale of the same name, case-insensitively). Returns a function that unregisters it. |
| registerColorscales | Register many colorscales at once. With overwrite: false, names that already resolve (a registered scale or a plotly.js built-in) are skipped — how the built-in sets are added without changing what existing names mean. |
| registerColorway | Register a named colorway (qualitative palette). Returns a function that unregisters it. |
| resolveTemplate | Resolve a layout.template value: a template object, a registered name, a +-composition of names, null/false for no template, or undefined for the registry's default template. |
| reverseColorscale | A scale with its stops mirrored: position p → 1 - p, order reversed. |
| schemaToJSON | Convert a schema node to JSON. Leaves keep their valType and constraints; containers become { role: 'object', ...meta, <children> } and item arrays { role: 'items', itemName, items }, mirroring Plotly's plot-schema layout so existing tooling can read it. |
| supplyDefaults | Compute fullData, fullLayout and fullConfig for a figure. |
| toRGBA | Convert a CSS color to sRGB 0–1 RGBA floats for the renderer, or null if invalid. Results are cached and frozen, so callers must not mutate them. |
| toRGBAArray | Pack a list of CSS colors into a Float32Array of 4 * n sRGB 0–1 floats (the render layer's per-item color format). Invalid entries use fallback. |
| validate | Validate a figure and return every issue found (empty when valid). |
| withExtrusion | module with extrusionAttributes added to its schema and coerced after its own defaults: the full bundle registers withExtrusion(bar) (plan E9.10); the trace's view draws depth (bar: setBarExtruder). |