Skip to content

Interface: ComponentLayoutContext ​

Experimental

Context for ComponentModule.pushMargin.

Properties ​

PropertyModifierTypeDescription
axesreadonlyReadonlyMap<string, AxisInfo>Experimental Axes with their types and scales. Ranges and lengths are those of the previous layout pass (or defaults on first draw); the iterative automargin solve (E4.2) refines this.
fullDatareadonlyreadonly FullTrace[]Experimental
fullLayoutreadonlyFullLayoutExperimental
heightreadonlynumberExperimental
widthreadonlynumberExperimental Figure size in CSS px.

Methods ​

calcdata()? ​

ts
optional calcdata(index): unknown;

Experimental

Calcdata of trace index (M2 wave 1), e.g. for legendItems; undefined before its first calc (the first margin pass of a figure runs before calc; automargin passes run after it).

Parameters ​

ParameterType
indexnumber

Returns ​

unknown


traceModule()? ​

ts
optional traceModule(type):
  | TraceModule<unknown, Children>
  | undefined;

Experimental

The registered module of a trace type (e.g. to ask traces for their colorbars).

Parameters ​

ParameterType
typestring

Returns ​

| TraceModule<unknown, Children> | undefined

Released under the MIT License.