Class CustomWidgetsService
Service for working with custom widgets.
Constructors
constructor
new CustomWidgetsService():
CustomWidgetsService
Returns
Methods
hasCustomWidget
hasCustomWidget(
customWidgetType):boolean
Checks if a custom widget is registered.
Parameters
| Parameter | Type | Description |
|---|---|---|
customWidgetType | string | The type of the custom widget. |
Returns
boolean
True if the custom widget is registered, false otherwise.
registerCustomWidget
registerCustomWidget<
Props>(customWidgetType,customWidget):void
Registers a new custom widget.
Type parameters
| Parameter | Default |
|---|---|
Props extends CustomWidgetComponentProps< GenericDataOptions, CustomWidgetStyleOptions, AbstractDataPointWithEntries, Props > | CustomWidgetComponentProps< GenericDataOptions, CustomWidgetStyleOptions, AbstractDataPointWithEntries > |
Parameters
| Parameter | Type | Description |
|---|---|---|
customWidgetType | string | The unique identifier for the custom widget type. |
customWidget | CustomWidgetComponent< Props > | The custom widget component class to register. |
Returns
void
unregisterCustomWidget
unregisterCustomWidget(
customWidgetType):void
Unregisters a custom widget for the given type name.
Parameters
| Parameter | Type | Description |
|---|---|---|
customWidgetType | string | The unique identifier for the custom widget type. |
Returns
void