Skip to content

Interface: ComponentModule ​

Experimental

A layout component (plan E22.3): core's layout schema/defaults plus optional margin pushes and drawing. Axes (E3.4), legend (E5.2), title (E5.1), … are components; so are third-party watermarks or brushes.

Extends ​

Properties ​

PropertyModifierTypeDescriptionInherited from
draw?readonlyComponentRendererExperimental-
kind?readonly"component"Experimental-
layoutSchema?readonlyChildrenExperimentalCoreComponentModule.layoutSchema
namereadonlystringExperimentalCoreComponentModule.name
order?readonlynumberExperimental Draw order among components (lower first; ties keep registration order). Default 0.-

Methods ​

extremes()? ​

ts
optional extremes(ctx):
  | Readonly<Record<string, AxisExtremes>>
  | undefined;

Experimental

Autorange contributions, by axis id ('x', 'y2'), merged with the traces' extremes: e.g. data-referenced shapes (Plotly's shapes/calc_autorange.js). Called on every autorange pass; axes have their types and scales, ranges are not final yet.

Parameters ​

ParameterType
ctxComponentExtremesContext

Returns ​

| Readonly<Record<string, AxisExtremes>> | undefined


pushMargin()? ​

ts
optional pushMargin(ctx):
  | MarginPush
  | readonly MarginPush[]
  | undefined;

Experimental

Parameters ​

ParameterType
ctxComponentLayoutContext

Returns ​

| MarginPush | readonly MarginPush[] | undefined


supplyLayoutDefaults()? ​

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

Experimental

Parameters ​

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

Returns ​

void

Inherited from ​

CoreComponentModule.supplyLayoutDefaults

Released under the MIT License.