Skip to content

NgDiagramGroupsService

The NgDiagramGroupsService provides methods for managing node groups in the diagram.

private groupsService = inject(NgDiagramGroupsService);
// Add nodes to a group
this.groupsService.addToGroup('groupId', ['nodeId1', 'nodeId2']);
  • NgDiagramBaseService

addToGroup(groupId, nodeIds): void

Adds nodes to a group.

string

The ID of the group to add nodes to.

string[]

Array of node IDs to add to the group.

void


highlightGroup(groupId, nodes): void

Highlights a group.

string

The ID of the group to highlight.

Node[]

The nodes to highlight as part of the group.

void


highlightGroupClear(): void

Clears all group highlights.

void


removeFromGroup(groupId, nodeIds): void

Removes nodes from a group.

string

The ID of the group to remove nodes from.

string[]

Array of node IDs to remove from the group.

void