Interface: Registry
Experimental
Holds trace modules, components and named templates for a set of charts. Keeping this an explicit object (rather than module-level state) keeps core pure and lets tests and apps run isolated registries side by side.
Extends
Properties
| Property | Modifier | Type | Description | Overrides |
|---|---|---|---|---|
defaultTemplate | readonly | string | undefined | Name of the template used when layout.template is unset, if any. | TemplateSource.defaultTemplate |
locales | readonly | LocaleStore | Experimental The registered locales. | - |
Methods
components()
components(): readonly CoreComponentModule[];Experimental
Returns
readonly CoreComponentModule[]
getLayoutSchema()
getLayoutSchema(): ObjectNode;Experimental
Base layout schema merged with every module's and component's layout attributes.
Returns
getModule()
getModule(type):
| CoreTraceModule<Children>
| undefined;Experimental
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
| CoreTraceModule<Children> | undefined
getTemplate()
getTemplate(name): Template | undefined;Experimental
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
Template | undefined
Overrides
getTraceSchema()
getTraceSchema(type): ObjectNode<Children> | undefined;Experimental
Full schema for a trace type: common attributes merged with the module's schema.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
ObjectNode<Children> | undefined
register()
register(...modules): Registry;Experimental
Register trace modules. Re-registering a type replaces it. Returns the registry.
Parameters
| Parameter | Type |
|---|---|
...modules | CoreTraceModule<Children>[] |
Returns
Registry
registerComponent()
registerComponent(...components): Registry;Experimental
Register layout components. Re-registering a name replaces it. Returns the registry.
Parameters
| Parameter | Type |
|---|---|
...components | CoreComponentModule[] |
Returns
Registry
registerLocale()
registerLocale(...modules): Registry;Experimental
Register locale modules (plan E17.6), plotly.js's shape ({ moduleType: 'locale', name, … }). config.locale looks them up by name.
Parameters
| Parameter | Type |
|---|---|
...modules | LocaleModule[] |
Returns
Registry
registerTemplate()
registerTemplate(name, template): Registry;Experimental
Register a named template (referenced as layout.template: 'name').
Parameters
| Parameter | Type |
|---|---|
name | string |
template | Template |
Returns
Registry
setDefaultTemplate()
setDefaultTemplate(name): Registry;Experimental
Template applied when layout.template is unset (undefined to apply none).
Parameters
| Parameter | Type |
|---|---|
name | string | undefined |
Returns
Registry
templateNames()
templateNames(): string[];Experimental
Returns
string[]
traceTypes()
traceTypes(): string[];Experimental
Registered trace types in registration order.
Returns
string[]
warnOnce()
warnOnce(issue): void;Experimental
Report an issue through console.warn, at most once per path and code.
Parameters
| Parameter | Type |
|---|---|
issue | Issue |
Returns
void