Interface: MosaicVgplotComponent
Manages the lifecycle of a vgplot component within Cosmograph’s Mosaic integration. This class handles mounting, validation, and cleanup of vgplot components and ensures they properly integrate with Cosmograph’s data and selections.
Accessors
id
Get Signature
get id():
string
Gets the unique identifier for this component.
Returns
string
errorMessage
Get Signature
get errorMessage():
undefined|string
Gets the error message if the component failed to mount. Check if this is truthy to determine if an error occurred.
Returns
undefined | string
Methods
mount()
mount(
component,container):Promise<void>
Mounts a Mosaic component (vgplot) to a DOM container. The component will automatically connect to Cosmograph’s coordinator and participate in the crossfilter system.
Parameters
| Parameter | Type | Description |
|---|---|---|
component | HTMLElement | The vgplot component (e.g., from vg.plot(), vg.vconcat(), etc.) |
container | HTMLElement | The DOM element to mount the component into |
Returns
Promise<void>
A promise that resolves when the component is mounted
destroy()
destroy():
Promise<void>
Destroys the component and cleans up all resources.
Returns
Promise<void>