Skip to main content

Interface: IShapesGroupControllerApi

Charting Library.IShapesGroupControllerApi

Drawing Groups API. Refer to the Drawings API article for more information.

Methods

addShapeToGroup

addShapeToGroup(groupId, shapeId): void

Add a drawing to a group.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.
shapeIdEntityIdA drawing ID.

availableZOrderOperations

availableZOrderOperations(groupId): AvailableZOrderOperations

Get an object containing the available Z-order operations for a group.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.

Returns

AvailableZOrderOperationsThe available Z-order operations.


bringForward

bringForward(groupId): void

Move the group one level up in the Z-order.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.

bringToFront

bringToFront(groupId): void

Move the group to the top of the Z-order.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.

canBeGroupped

canBeGroupped(shapes): boolean

Check if some drawings can be grouped.

Parameters

NameTypeDescription
shapesreadonly EntityId[]An array of drawing IDs.

Returns

booleantrue if the drawings can be grouped, false otherwise.


createGroupFromSelection

createGroupFromSelection(): ShapesGroupId

Create a group of drawings from the selection.

Returns

ShapesGroupIdThe ID of the created group.

If selection is empty, or selection contains non-drawings, or selection contains drawings from more than one pane.


excludeShapeFromGroup

excludeShapeFromGroup(groupId, shapeId): void

Remove a drawing from a group. If the drawing is the only drawing in the group then the group is also removed.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.
shapeIdEntityIdA drawing ID.

getGroupName

getGroupName(groupId): string

Get the name of a group.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.

Returns

stringThe name of the group.


groupLock

groupLock(groupId): GroupLockState

Get locked state of a group.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.

Returns

GroupLockStateThe locked state.


groupVisibility

groupVisibility(groupId): GroupVisibilityState

Get the visibility state of a group.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.

Returns

GroupVisibilityStateThe visibility state.


groups

groups(): readonly ShapesGroupId[]

Get an array of all drawing groups.

Returns

readonly ShapesGroupId[]An array of group IDs.


insertAfter

insertAfter(groupId, target): void

Move the group immediately below the target in the Z-order.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.
targetEntityId | ShapesGroupIdA target ID.

insertBefore

insertBefore(groupId, target): void

Move the group immediately above the target in the Z-order.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.
targetEntityId | ShapesGroupIdA target ID.

removeGroup

removeGroup(groupId): void

Remove a group of drawings.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.

sendBackward

sendBackward(groupId): void

Move the group one level down in the Z-order.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.

sendToBack

sendToBack(groupId): void

Move the group to the bottom of the Z-order.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.

setGroupLock

setGroupLock(groupId, value): void

Lock or unlock a group.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.
valuebooleanA boolean flag. true to lock, false to unlock.

setGroupName

setGroupName(groupId, name): void

Set the name of a group. Names do not need to be unique.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.
namestringThe new name of the group.

setGroupVisibility

setGroupVisibility(groupId, value): void

Show or hide all drawings in a group.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.
valuebooleanA boolean flag. true to show, false to hide.

shapesInGroup

shapesInGroup(groupId): readonly EntityId[]

Get an array of IDs for each drawing in a group.

Parameters

NameTypeDescription
groupIdShapesGroupIdA group ID.

Returns

readonly EntityId[]An array of drawing IDs.