Skip to content

Interface: AttrSpec<TIn, TFull> ​

Experimental

A leaf attribute.

Extends ​

Type Parameters ​

Type ParameterDefault typeDescription
TInunknownAccepted input type (what users write).
TFullunknownType after defaults (what later stages read).

Properties ​

PropertyModifierTypeDescriptionInherited from
~full?readonly[TFull]Experimental Phantom: full type. Never set at runtime.-
~in?readonly[TIn]Experimental Phantom: input type. Never set at runtime.-
accepts?readonly(value) => booleanExperimental enumerated only: also accept values this predicate approves, e.g. marker symbols registered at runtime (plan E8.11). Not serialized (plot-schema.json lists values only).AttrConstraints.accepts
animatable?readonlybooleanExperimental Whether transitions can interpolate this attribute (E7.3).NodeMeta.animatable
arrayOk?readonlybooleanExperimental Accept per-point arrays in addition to a scalar value.AttrConstraints.arrayOk
clamp?readonlybooleanExperimental Clamp out-of-range numbers instead of falling back to dflt.AttrConstraints.clamp
deprecated?readonlystringExperimental Deprecation message. Using a deprecated attribute produces a deprecated issue.NodeMeta.deprecated
description?readonlystringExperimental Markdown description used for generated docs, JSDoc and editor hovers.NodeMeta.description
dflt?readonlyunknownExperimental Default value (undefined means the attribute is absent from the full output when unset).AttrConstraints.dflt
editType?readonlyEditTypeExperimental Pipeline stages invalidated by a change. Inherited from the nearest ancestor that declares one; the planner treats an undeclared root as calc.NodeMeta.editType
examples?readonlyreadonly unknown[]Experimental Example values for docs.NodeMeta.examples
extras?readonlyreadonly PrimitiveValue[]Experimental Special values accepted verbatim: flaglist extras ('none'), numeric extras ('auto'), subplot-id extras ('paper', 'free').AttrConstraints.extras
flags?readonlyreadonly string[]Experimental Flags for flaglist, joined with + (e.g. lines+markers).AttrConstraints.flags
freeLength?readonlybooleanExperimental Allow info_array to be shorter/longer than items.AttrConstraints.freeLength
items?readonly| AttrSpec<unknown, unknown> | readonly AttrSpec<unknown, unknown>[]Experimental Item specs for info_array: one spec for every item, or one per position.AttrConstraints.items
kindreadonly"attr"Experimental-
max?readonlynumberExperimentalAttrConstraints.max
min?readonlynumberExperimental Inclusive bounds for number, integer and info_array items.AttrConstraints.min
noBlank?readonlybooleanExperimental Reject empty strings (string).AttrConstraints.noBlank
plotlyPath?readonlystringExperimental Equivalent Plotly attribute path, when it differs from ours (compat-plotly, docs).NodeMeta.plotlyPath
role?readonlyAttrRoleExperimental Docs grouping.NodeMeta.role
since?readonlystringExperimental Version in which the attribute first appeared.NodeMeta.since
strict?readonlybooleanExperimental Reject non-string values instead of stringifying numbers (string).AttrConstraints.strict
valTypereadonly| "string" | "number" | "boolean" | "function" | "integer" | "enumerated" | "flaglist" | "color" | "colorlist" | "colorscale" | "angle" | "subplotid" | "data_array" | "info_array" | "any"Experimental-
values?readonlyreadonly PrimitiveValue[]Experimental Allowed values for enumerated.AttrConstraints.values

Released under the MIT License.