Interface: IShapesGroupControllerApi
Charting Library.IShapesGroupControllerApi
Drawing Groups API.
Methods
addShapeToGroup
▸ addShapeToGroup(groupId
, shapeId
): void
Add a drawing to a group.
Parameters
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
shapeId | EntityId | A drawing ID. |
Returns
void
availableZOrderOperations
▸ availableZOrderOperations(groupId
): AvailableZOrderOperations
Get an object containing the available Z-order operations for a group.
Parameters
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
Returns
The available Z-order operations.
bringForward
▸ bringForward(groupId
): void
Move the group one level up in the Z-order.
Parameters
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
Returns
void
bringToFront
▸ bringToFront(groupId
): void
Move the group to the top of the Z-order.
Parameters
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
Returns
void
canBeGroupped
▸ canBeGroupped(shapes
): boolean
Check if some drawings can be grouped.
Parameters
Name | Type | Description |
---|---|---|
shapes | readonly EntityId [] | An array of drawing IDs. |
Returns
boolean
true
if the drawings can be grouped, false
otherwise.
createGroupFromSelection
▸ createGroupFromSelection(): ShapesGroupId
Create a group of drawings from the selection.
Returns
The ID of the created group.
Throws
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
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
shapeId | EntityId | A drawing ID. |
Returns
void
getGroupName
▸ getGroupName(groupId
): string
Get the name of a group.
Parameters
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
Returns
string
The name of the group.
groupLock
▸ groupLock(groupId
): GroupLockState
Get locked state of a group.
Parameters
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
Returns
The locked state.
groupVisibility
▸ groupVisibility(groupId
): GroupVisibilityState
Get the visibility state of a group.
Parameters
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
Returns
The 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
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
target | EntityId | ShapesGroupId | A target ID. |
Returns
void
insertBefore
▸ insertBefore(groupId
, target
): void
Move the group immediately above the target in the Z-order.
Parameters
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
target | EntityId | ShapesGroupId | A target ID. |
Returns
void
removeGroup
▸ removeGroup(groupId
): void
Remove a group of drawings.
Parameters
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
Returns
void
sendBackward
▸ sendBackward(groupId
): void
Move the group one level down in the Z-order.
Parameters
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
Returns
void
sendToBack
▸ sendToBack(groupId
): void
Move the group to the bottom of the Z-order.
Parameters
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
Returns
void
setGroupLock
▸ setGroupLock(groupId
, value
): void
Lock or unlock a group.
Parameters
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
value | boolean | A boolean flag. true to lock, false to unlock. |
Returns
void
setGroupName
▸ setGroupName(groupId
, name
): void
Set the name of a group. Names do not need to be unique.
Parameters
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
name | string | The new name of the group. |
Returns
void
setGroupVisibility
▸ setGroupVisibility(groupId
, value
): void
Show or hide all drawings in a group.
Parameters
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
value | boolean | A boolean flag. true to show, false to hide. |
Returns
void
shapesInGroup
▸ shapesInGroup(groupId
): readonly EntityId
[]
Get an array of IDs for each drawing in a group.
Parameters
Name | Type | Description |
---|---|---|
groupId | ShapesGroupId | A group ID. |
Returns
readonly EntityId
[]
An array of drawing IDs.