# Class: ChartSpecRegistry
The ChartSpecRegistry
is a container for Vega/Vega-Lite (opens new window)
chart specifications.
Chart specifications can be registered and retrieved by ID.
# Hierarchy
- ChartSpecRegistry
# Constructors
# constructor
+ new ChartSpecRegistry(): ChartSpecRegistry
Constructs a new chart specification registry instance.
Returns: ChartSpecRegistry
# Methods
# getSpec
▸ getSpec(id
: string): Promise<ChartSpec>
Get a chart specification.
This method returns a promise that will resolve when the specification has been registered.
# Parameters:
Name | Type | Description |
---|---|---|
id | string | Chart specification ID. |
Returns: Promise<ChartSpec>
# registerSpec
▸ registerSpec(id
: string, spec
: ChartSpec): void
Register a chart specification.
# Parameters:
Name | Type | Description |
---|---|---|
id | string | Chart specification ID. |
spec | ChartSpec | Chart specification. |
Returns: void
# unregisterSpec
▸ unregisterSpec(id
: string): void
Unregister a chart specification.
# Parameters:
Name | Type | Description |
---|---|---|
id | string | Chart specification ID. |
Returns: void