Skip to main content

remove()

deletes the specified item from the diagram

remove(id: Id | Id[]): void;

Parameters:

  • id: string | number | array - the ids of the items that should be deleted

Example

diagram.data.remove("2");

Related sample: Diagram. Data. Add/delete item

If the diagram is initialized in the org (type: "org") or mindmap (type: "mindmap") mode, deleting a shape will remove the link to this shape and all child shapes as well.

Deleting items