Interface: AttrBuilders
Experimental
The builders of the schema DSL (attr), one per attribute type and container.
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
angle | readonly | <O>(opts?) => Attr<NumArrayOk<number, O> | Extras<O>, O> | Experimental An angle in degrees, normalized to [-180, 180). |
any | readonly | <O>(opts?) => AttrSpec<unknown, unknown> | Experimental Any value; only undefined/null mean unset. |
boolean | readonly | <O>(opts?) => Attr<ArrayOk<boolean, O>, O> | Experimental A boolean. Only true and false are accepted. |
color | readonly | <O>(opts?) => Attr<ArrayOk<string, O>, O> | Experimental Any CSS color. Stored in the full output as canonical rgb()/rgba(). |
colorlist | readonly | <O>(opts?) => AttrSpec<readonly string[], Full<string[], O>> | Experimental A list of CSS colors (e.g. colorway). |
colorscale | readonly | <O>(opts?) => Attr<ColorScale, O> | Experimental A named colorscale or a list of [position, color] stops. |
dataArray | readonly | <O>(opts?) => AttrSpec<DataArray, DataArray | undefined> | Experimental A column of data (plain or typed array). Kept by reference, never copied. |
enumerated | readonly | <O>(opts) => Attr<ArrayOk<EnumValue<O>, O>, O> | Experimental One of a fixed set of values. |
flaglist | readonly | <O>(opts) => Attr<ArrayOk<FlagValue<O> | Extras<O>, O>, O> | Experimental A +-joined combination of flags ('lines+markers'), or one of extras alone. |
fn | readonly | <O>(opts?) => AttrSpec<AnyFunction, AnyFunction | undefined> | Experimental A function (style accessor, callback). Dropped from plot-schema.json values. |
infoArray | readonly | <O>(opts) => AttrSpec<InfoItems<O>, Full<InfoItemsFull<O>, O>> | Experimental A fixed-shape array such as an axis range ([min, max]). |
integer | readonly | <O>(opts?) => Attr<NumArrayOk<number, O> | Extras<O>, O> | Experimental An integer. Non-integral numbers are rejected. |
items | readonly | <C>(children, opts) => ItemsNode<C & TemplatedItemChildren> | Experimental An array of objects (annotations, shapes, …). Every item automatically gets name and templateitemname so it can be defined in, or linked to, a template (plan E1.5). |
number | readonly | <O>(opts?) => Attr<NumArrayOk<number, O> | Extras<O>, O> | Experimental A floating-point number. Numeric strings are coerced to numbers. Out-of-range values fall back to dflt (or are clamped with clamp: true). |
object | readonly | <C>(children, meta?) => ObjectNode<C> | Experimental A nested container. |
string | readonly | <O>(opts?) => Attr<ArrayOk<string, O>, O> | Experimental A string. Numbers are stringified unless strict: true. |
subplotId | readonly | <O>(opts) => Attr<SubplotValue<O> | Extras<O>, O> | Experimental A subplot reference such as 'x', 'x2', 'scene3'. 'x1' is normalized to 'x'. |
subplotObject | readonly | <C>(subplot, children, meta?) => ObjectNode<C> | Experimental A subplot container family: xaxis also matches xaxis2, xaxis3, … (plan E1.4). subplot is the base subplot id of the family ('x' for xaxis). |