deleteInsight()
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Creates the DeleteInsight command. Dispatching this command will delete the insight (visualization) from the workspace and request a refresh of the visualization list.
export declare function deleteInsight(ref: ObjRef, correlationId?: string): IDeleteInsight;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | reference of the insight to delete | |
correlationId | string | (Optional) specify correlation id to use for this command. this will be included in all events that will be emitted during the command processing |
Returns
Remarks
The command is rejected when the dashboard being edited uses the insight, in a saved or an unsaved widget, visualization switcher entry or drill target; remove it from the dashboard first. Other dashboards are not inspected here; check them before dispatching, for instance with IWorkspaceInsightsService.getInsightReferencingObjects().