Skip to content

Interface: CoreTraceModule<C> ​

Experimental

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.

Type Parameters ​

Type ParameterDefault type
C extends ChildrenChildren

Properties ​

PropertyModifierTypeDescription
animatable?readonlyreadonly string[]Experimental Attribute paths that support transitions (E7.3).
calc?readonlyunknownExperimental
categoriesreadonlyreadonly TraceCategory[]Experimental
colorbar?readonlyunknownExperimental
crossTraceCalc?readonlyunknownExperimental
hoverPoints?readonlyunknownExperimental
layoutSchema?readonlyChildrenExperimental Layout attributes owned by this trace type (e.g. barmode), coerced when a trace of this type is present.
legendIcon?readonlyunknownExperimental
metareadonlyTraceModuleMetaExperimental
plot?readonlyunknownExperimental
schemareadonlyObjectNode<C>Experimental
selectPoints?readonlyunknownExperimental
typereadonlystringExperimental

Methods ​

axisHints()? ​

ts
optional axisHints(trace): TraceAxisHints | undefined;

Experimental

Axis defaults a cartesian trace asks for (ADR-029), called with the defaulted trace while the axes are defaulted: hidden axes, equal scales, and where its positions are when they are not in x / y. Return undefined (or leave the method out) for a trace that is drawn on its axes like any other. The 3D scenes ask it of their traces too, for their three axes.

Parameters ​

ParameterType
traceFullTrace

Returns ​

TraceAxisHints | undefined


supplyDefaults() ​

ts
supplyDefaults(
   traceIn,
   traceOut,
   ctx
): void;

Experimental

Fill traceOut from traceIn using ctx.coerce. Called after common attributes are coerced, and only for traces with visible !== false.

Parameters ​

ParameterType
traceInReadonly<Record<string, unknown>>
traceOutFullTrace
ctxTraceDefaultsContext

Returns ​

void


supplyLayoutDefaults()? ​

ts
optional supplyLayoutDefaults(
   layoutIn,
   layoutOut,
   ctx
): void;

Experimental

Extra layout defaults logic, run after layoutSchema is coerced.

Parameters ​

ParameterType
layoutInReadonly<Record<string, unknown>>
layoutOutFullLayout
ctxLayoutDefaultsContext

Returns ​

void

Released under the MIT License.