Skip to content

Interface: AttrConstraints ​

Experimental

Constraint fields for leaf attributes. Which fields apply depends on valType; builders in attr.ts only expose the relevant ones.

Extended by ​

Properties ​

PropertyModifierTypeDescription
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).
arrayOk?readonlybooleanExperimental Accept per-point arrays in addition to a scalar value.
clamp?readonlybooleanExperimental Clamp out-of-range numbers instead of falling back to dflt.
dflt?readonlyunknownExperimental Default value (undefined means the attribute is absent from the full output when unset).
extras?readonlyreadonly PrimitiveValue[]Experimental Special values accepted verbatim: flaglist extras ('none'), numeric extras ('auto'), subplot-id extras ('paper', 'free').
flags?readonlyreadonly string[]Experimental Flags for flaglist, joined with + (e.g. lines+markers).
freeLength?readonlybooleanExperimental Allow info_array to be shorter/longer than items.
items?readonly| AttrSpec<unknown, unknown> | readonly AttrSpec<unknown, unknown>[]Experimental Item specs for info_array: one spec for every item, or one per position.
max?readonlynumberExperimental
min?readonlynumberExperimental Inclusive bounds for number, integer and info_array items.
noBlank?readonlybooleanExperimental Reject empty strings (string).
strict?readonlybooleanExperimental Reject non-string values instead of stringifying numbers (string).
values?readonlyreadonly PrimitiveValue[]Experimental Allowed values for enumerated.

Released under the MIT License.