# GC.Spread.Sheets.Shapes.GroupShape

## Content

# Class: GroupShape

[Sheets](../modules/GC.Spread.Sheets).[Shapes](../modules/GC.Spread.Sheets.Shapes).GroupShape

## Hierarchy

- [`ShapeBase`](GC.Spread.Sheets.Shapes.ShapeBase)

  ↳ **`GroupShape`**

## Table of contents

### Constructors

- [constructor](GC.Spread.Sheets.Shapes.GroupShape#constructor)

### Methods

- [add](GC.Spread.Sheets.Shapes.GroupShape#add)
- [all](GC.Spread.Sheets.Shapes.GroupShape#all)
- [allowMove](GC.Spread.Sheets.Shapes.GroupShape#allowmove)
- [allowResize](GC.Spread.Sheets.Shapes.GroupShape#allowresize)
- [allowRotate](GC.Spread.Sheets.Shapes.GroupShape#allowrotate)
- [alt](GC.Spread.Sheets.Shapes.GroupShape#alt)
- [canPrint](GC.Spread.Sheets.Shapes.GroupShape#canprint)
- [dynamicMove](GC.Spread.Sheets.Shapes.GroupShape#dynamicmove)
- [dynamicSize](GC.Spread.Sheets.Shapes.GroupShape#dynamicsize)
- [endColumn](GC.Spread.Sheets.Shapes.GroupShape#endcolumn)
- [endColumnOffset](GC.Spread.Sheets.Shapes.GroupShape#endcolumnoffset)
- [endRow](GC.Spread.Sheets.Shapes.GroupShape#endrow)
- [endRowOffset](GC.Spread.Sheets.Shapes.GroupShape#endrowoffset)
- [find](GC.Spread.Sheets.Shapes.GroupShape#find)
- [getFormula](GC.Spread.Sheets.Shapes.GroupShape#getformula)
- [height](GC.Spread.Sheets.Shapes.GroupShape#height)
- [hyperlink](GC.Spread.Sheets.Shapes.GroupShape#hyperlink)
- [isLocked](GC.Spread.Sheets.Shapes.GroupShape#islocked)
- [isSelected](GC.Spread.Sheets.Shapes.GroupShape#isselected)
- [isVisible](GC.Spread.Sheets.Shapes.GroupShape#isvisible)
- [name](GC.Spread.Sheets.Shapes.GroupShape#name)
- [remove](GC.Spread.Sheets.Shapes.GroupShape#remove)
- [rotate](GC.Spread.Sheets.Shapes.GroupShape#rotate)
- [setFormula](GC.Spread.Sheets.Shapes.GroupShape#setformula)
- [showHandle](GC.Spread.Sheets.Shapes.GroupShape#showhandle)
- [startColumn](GC.Spread.Sheets.Shapes.GroupShape#startcolumn)
- [startColumnOffset](GC.Spread.Sheets.Shapes.GroupShape#startcolumnoffset)
- [startRow](GC.Spread.Sheets.Shapes.GroupShape#startrow)
- [startRowOffset](GC.Spread.Sheets.Shapes.GroupShape#startrowoffset)
- [toImageSrc](GC.Spread.Sheets.Shapes.GroupShape#toimagesrc)
- [toImageSrcAsync](GC.Spread.Sheets.Shapes.GroupShape#toimagesrcasync)
- [width](GC.Spread.Sheets.Shapes.GroupShape#width)
- [x](GC.Spread.Sheets.Shapes.GroupShape#x)
- [y](GC.Spread.Sheets.Shapes.GroupShape#y)
- [zIndex](GC.Spread.Sheets.Shapes.GroupShape#zindex)

## Constructors

### <a id="constructor" name="constructor"></a> constructor

• **new GroupShape**(`worksheet`, `name?`)

Represents a groupShape.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `worksheet` | [`Worksheet`](GC.Spread.Sheets.Worksheet) | The host sheet of the groupShape. |
| `name?` | `string` | - |

#### Overrides

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[constructor](GC.Spread.Sheets.Shapes.ShapeBase#constructor)

## Methods

### <a id="add" name="add"></a> add

▸ **add**(`shape`): `void`

add a shape to the group shape.

**`example`**
```javascript
var shape1 = activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
var shape2 = activeSheet.shapes.add("shape2", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 260, 50, 100, 150);
var groupShape = activeSheet.shapes.group([shape1, shape2]);
var shape3 = activeSheet.shapes.add("shape3", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 260, 100, 150);
// add shape3 to groupShape.
groupShape.add(shape3);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `shape` | [`Shape`](GC.Spread.Sheets.Shapes.Shape) | The shape which added to the group shape. |

#### Returns

`void`

___

### <a id="all" name="all"></a> all

▸ **all**(): [`Shape`](GC.Spread.Sheets.Shapes.Shape)[]

get all shapes of group shape.

**`example`**
```javascript
// This sample shows how to get all shapes in group shape.
var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
var shape2 = sheet.shapes.add("myShape2", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 20, 20, 200, 200);
var groupShape = sheet.shapes.group([shape1, shape2]);
var shapes = groupShape.all();
```

#### Returns

[`Shape`](GC.Spread.Sheets.Shapes.Shape)[]

all shapes

___

### <a id="allowmove" name="allowmove"></a> allowMove

▸ **allowMove**(`value?`): `any`

Gets or sets whether to disable moving the shape.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.allowMove();
heart.allowMove(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The setting for whether to disable moving the shape. |

#### Returns

`any`

If no value is set, returns the setting for whether to disable moving the shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[allowMove](GC.Spread.Sheets.Shapes.ShapeBase#allowmove)

___

### <a id="allowresize" name="allowresize"></a> allowResize

▸ **allowResize**(`value?`): `any`

Gets or sets the resize mode of the shape.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.allowResize();
heart.allowResize(GC.Spread.Sheets.Shapes.ResizeMode.aspect);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` \| [`ResizeMode`](../enums/GC.Spread.Sheets.Shapes.ResizeMode) | The setting for whether to disable resizing the shape. |

#### Returns

`any`

If no value is set, returns the setting for whether to disable resizing the shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[allowResize](GC.Spread.Sheets.Shapes.ShapeBase#allowresize)

___

### <a id="allowrotate" name="allowrotate"></a> allowRotate

▸ **allowRotate**(`value?`): `any`

Gets or sets whether to disable rotating the shape.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.allowRotate();
heart.allowRotate(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The setting for whether to disable rotating the shape. |

#### Returns

`any`

If no value is set, returns the setting for whether to disable rotating the shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[allowRotate](GC.Spread.Sheets.Shapes.ShapeBase#allowrotate)

___

### <a id="alt" name="alt"></a> alt

▸ **alt**(`value?`): `any`

Gets or sets the alternative text of the shape for screen readers.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
heart.alt("A heart shape");
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | `string` |

#### Returns

`any`

The alternative text of the shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[alt](GC.Spread.Sheets.Shapes.ShapeBase#alt)

___

### <a id="canprint" name="canprint"></a> canPrint

▸ **canPrint**(`value?`): `any`

Gets or sets whether this shape is printable.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.canPrint(); // Get whether the shape is printable, defaulat value is true.
workbook.print(); // The heart shape is printed.
heart.canPrint(false);
workbook.print(); // The heart shape is not printed.
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | `boolean` |

#### Returns

`any`

If no value is set, returns whether this shape is printable.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[canPrint](GC.Spread.Sheets.Shapes.ShapeBase#canprint)

___

### <a id="dynamicmove" name="dynamicmove"></a> dynamicMove

▸ **dynamicMove**(`value?`): `any`

Gets or sets whether the shape moves when hiding or showing, resizing, or moving rows or columns.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.dynamicMove();
heart.dynamicMove(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The value indicates whether the shape moves when hiding or showing, resizing, or moving rows or columns. |

#### Returns

`any`

If no value is set, returns whether this shape dynamically moves.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[dynamicMove](GC.Spread.Sheets.Shapes.ShapeBase#dynamicmove)

___

### <a id="dynamicsize" name="dynamicsize"></a> dynamicSize

▸ **dynamicSize**(`value?`): `any`

Gets or sets whether the size of the shape changes when hiding or showing, resizing, or moving rows or columns.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.dynamicSize();
heart.dynamicSize(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The value indicates whether the size of the shape changes when hiding or showing, resizing, or moving rows or columns. |

#### Returns

`any`

If no value is set, returns whether this shape dynamically changes size.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[dynamicSize](GC.Spread.Sheets.Shapes.ShapeBase#dynamicsize)

___

### <a id="endcolumn" name="endcolumn"></a> endColumn

▸ **endColumn**(`value?`): `any`

Gets or sets the end column index of the shape position.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.endColumn();
heart.endColumn(n + 1);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The end column index of the shape position. |

#### Returns

`any`

If no value is set, returns the end column index of the shape position.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[endColumn](GC.Spread.Sheets.Shapes.ShapeBase#endcolumn)

___

### <a id="endcolumnoffset" name="endcolumnoffset"></a> endColumnOffset

▸ **endColumnOffset**(`value?`): `any`

Gets or sets the offset relative to the end column of the shape.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.endColumnOffset();
heart.endColumnOffset(0);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The offset relative to the end column of the shape. |

#### Returns

`any`

If no value is set, returns the offset relative to the end column of the shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[endColumnOffset](GC.Spread.Sheets.Shapes.ShapeBase#endcolumnoffset)

___

### <a id="endrow" name="endrow"></a> endRow

▸ **endRow**(`value?`): `any`

Gets or sets the end row index of the shape position.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.endRow();
heart.endRow(n + 2);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The end row index of the shape position. |

#### Returns

`any`

If no value is set, returns the end row index of the shape position.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[endRow](GC.Spread.Sheets.Shapes.ShapeBase#endrow)

___

### <a id="endrowoffset" name="endrowoffset"></a> endRowOffset

▸ **endRowOffset**(`value?`): `any`

Gets or sets the offset relative to the end row of the shape.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.endRowOffset();
heart.endRowOffset(0);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The offset relative to the end row of the shape. |

#### Returns

`any`

If no value is set, returns the offset relative to the end row of the shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[endRowOffset](GC.Spread.Sheets.Shapes.ShapeBase#endrowoffset)

___

### <a id="find" name="find"></a> find

▸ **find**(`name`): [`Shape`](GC.Spread.Sheets.Shapes.Shape)

Get shape by name in group shape.

**`example`**
```javascript
var shape1 = activeSheet.shapes.add("heart1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
var shape2 = activeSheet.shapes.add("heart2", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 260, 50, 100, 150);
var groupShape = activeSheet.shapes.group([shape1, shape2]);
var heart1 = groupShape.find("heart1"); // heart1 is equal to shape1.
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The name of shape in groupShape. |

#### Returns

[`Shape`](GC.Spread.Sheets.Shapes.Shape)

The Shape instance if the name belongs to a shape of group shapes; otherwise, <c>null</c>.

___

### <a id="getformula" name="getformula"></a> getFormula

▸ **getFormula**(`path`): `string`

Gets the formula string from the shape by the path.

**`example`**
```javascript
sheet.name("Sheet1");
sheet.setValue(0, 1, 30);
var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
var shape2 = sheet.shapes.add("myShape2", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 20, 20, 200, 200);
var shape = sheet.shapes.group([shape1, shape2]);
shape.setFormula("rotate", "=Sheet1!B1");
shape.getFormula("rotate");//returns "=Sheet1!B1"
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `path` | `string` | The path which can accept a formula string, it could be one of "x", "y", "width", "height", "rotate". |

#### Returns

`string`

Returns the formula string from the shape by the path.

#### Overrides

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[getFormula](GC.Spread.Sheets.Shapes.ShapeBase#getformula)

___

### <a id="height" name="height"></a> height

▸ **height**(`value?`): `any`

Gets or sets the height of the shape.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.height();
heart.height(n + 50);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` \| `number` | The height of the shape specified by a number or formula (starts with =) can get a number value. |

#### Returns

`any`

If no value is set, returns the height of the shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[height](GC.Spread.Sheets.Shapes.ShapeBase#height)

___

### <a id="hyperlink" name="hyperlink"></a> hyperlink

▸ **hyperlink**(`value?`): `void` \| [`IHyperlink`](../interfaces/GC.Spread.Sheets.IHyperlink)

Gets or sets the hyperlink of the shape.

**`example`**
```javascript
var shape = sheet.shapes.add("myShape", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
shape.hyperlink({url: "http://www.spreadjs.com", target: 0, tooltip: 'goes to SpreadJS'});
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | [`IHyperlink`](../interfaces/GC.Spread.Sheets.IHyperlink) |

#### Returns

`void` \| [`IHyperlink`](../interfaces/GC.Spread.Sheets.IHyperlink)

If no value is set, returns the current hyperlink settings of the shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[hyperlink](GC.Spread.Sheets.Shapes.ShapeBase#hyperlink)

___

### <a id="islocked" name="islocked"></a> isLocked

▸ **isLocked**(`value?`): `any`

Gets or sets whether this shape is locked.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.isLocked();
heart.isLocked(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The value that indicates whether this shape is locked. |

#### Returns

`any`

If no value is set, returns whether this shape is locked.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[isLocked](GC.Spread.Sheets.Shapes.ShapeBase#islocked)

___

### <a id="isselected" name="isselected"></a> isSelected

▸ **isSelected**(`value?`): `any`

Gets or sets whether this shape is selected.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.isSelected();
heart.isSelected(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The value that indicates whether this shape is selected. |

#### Returns

`any`

If no value is set, returns whether this shape is selected.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[isSelected](GC.Spread.Sheets.Shapes.ShapeBase#isselected)

___

### <a id="isvisible" name="isvisible"></a> isVisible

▸ **isVisible**(`value?`): `any`

Gets or sets whether this shape is visible.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.isVisible();
heart.isVisible(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The value that indicates whether this shape is visible. |

#### Returns

`any`

If no value is set, returns whether this shape is visible.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[isVisible](GC.Spread.Sheets.Shapes.ShapeBase#isvisible)

___

### <a id="name" name="name"></a> name

▸ **name**(`value?`): `any`

Gets or sets the name of the shape.

**`example`**
```javascript
var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
var shape2 = sheet.shapes.add("myShape2", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 20, 20, 200, 200);
var shape = sheet.shapes.group([shape1, shape2]);
shape.name("myGroupShape");
var shapeName = shape.name();
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The name of the shape. |

#### Returns

`any`

If no value is set, returns the name of the shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[name](GC.Spread.Sheets.Shapes.ShapeBase#name)

___

### <a id="remove" name="remove"></a> remove

▸ **remove**(`shape`): `void`

remove a shape from group shape.

**`example`**
```javascript
var shape1 = activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
var shape2 = activeSheet.shapes.add("shape2", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 260, 50, 100, 150);
var shape3 = activeSheet.shapes.add("shape3", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 260, 100, 150);
var groupShape = activeSheet.shapes.group([shape1, shape2, shape3]);
// remove shape3 from groupShape.
groupShape.remove(shape3);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `shape` | [`Shape`](GC.Spread.Sheets.Shapes.Shape) | The shape to be removed from the group shape. |

#### Returns

`void`

___

### <a id="rotate" name="rotate"></a> rotate

▸ **rotate**(`value?`): `number` \| `void`

Gets or sets the rotate of groupShape.

**`example`**
```javascript
var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
var shape2 = sheet.shapes.add("myShape2", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 20, 20, 200, 200);
var shape = sheet.shapes.group([shape1, shape2]);
shape.rotate(60);
var angle = shape.rotate();
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` \| `number` | The rotate of the groupShape.The unit of measurement is the angle. |

#### Returns

`number` \| `void`

If the parameter 'value' is null or undefined,it will return the rotate of the groupShape.

___

### <a id="setformula" name="setformula"></a> setFormula

▸ **setFormula**(`path`, `formula`): `void`

Sets the formula string to the shape by the path.

**`example`**
```javascript
sheet.name("Sheet1");
sheet.setValue(0, 1, 30);
var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
var shape2 = sheet.shapes.add("myShape2", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 20, 20, 200, 200);
var shape = sheet.shapes.group([shape1, shape2]);
shape.setFormula("rotate", "=Sheet1!B1");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `path` | `string` | The path which can accept a formula string, it could be one of "x", "y", "width", "height", "rotate". |
| `formula` | `string` | The formula string. |

#### Returns

`void`

#### Overrides

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[setFormula](GC.Spread.Sheets.Shapes.ShapeBase#setformula)

___

### <a id="showhandle" name="showhandle"></a> showHandle

▸ **showHandle**(`value?`): `any`

Gets or sets whether to show handle of shape.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.showHandle();
heart.showHandle(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The setting for whether to show handle of shape. |

#### Returns

`any`

If no value is set, returns the setting for whether to show handle of shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[showHandle](GC.Spread.Sheets.Shapes.ShapeBase#showhandle)

___

### <a id="startcolumn" name="startcolumn"></a> startColumn

▸ **startColumn**(`value?`): `any`

Gets or sets the starting column index of the shape position.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.startColumn();
heart.startColumn(n + 2);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The starting column index of the shape position. |

#### Returns

`any`

If no value is set, returns the starting column index of the shape position.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[startColumn](GC.Spread.Sheets.Shapes.ShapeBase#startcolumn)

___

### <a id="startcolumnoffset" name="startcolumnoffset"></a> startColumnOffset

▸ **startColumnOffset**(`value?`): `any`

Gets or sets the offset relative to the start column of the shape.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.startColumnOffset();
heart.startColumnOffset(0);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The offset relative to the start column of the shape. |

#### Returns

`any`

If no value is set, returns the offset relative to the start column of the shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[startColumnOffset](GC.Spread.Sheets.Shapes.ShapeBase#startcolumnoffset)

___

### <a id="startrow" name="startrow"></a> startRow

▸ **startRow**(`value?`): `any`

Gets or sets the starting row index of the shape position.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.startRow();
heart.startRow(n + 2);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The starting row index of the shape position. |

#### Returns

`any`

If no value is set, returns the starting row index of the shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[startRow](GC.Spread.Sheets.Shapes.ShapeBase#startrow)

___

### <a id="startrowoffset" name="startrowoffset"></a> startRowOffset

▸ **startRowOffset**(`value?`): `any`

Gets or sets the offset relative to the start row of the shape.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.startRowOffset();
heart.startRowOffset(0);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The offset relative to the start row of the shape. |

#### Returns

`any`

If no value is set, returns the offset relative to the start row of the shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[startRowOffset](GC.Spread.Sheets.Shapes.ShapeBase#startrowoffset)

___

### <a id="toimagesrc" name="toimagesrc"></a> toImageSrc

▸ **toImageSrc**(): `string`

Get the shape Image src of type Base64 string.

**`example`**
```javascript
let shapeImageSrc = sheet.shapes.all()[0].toImageSrc();
```

#### Returns

`string`

return the shape Image Base64 src string.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[toImageSrc](GC.Spread.Sheets.Shapes.ShapeBase#toimagesrc)

___

### <a id="toimagesrcasync" name="toimagesrcasync"></a> toImageSrcAsync

▸ **toImageSrcAsync**(): `Promise`<`string`\>

Get the shape Image src of type Base64 string.

**`example`**
```javascript
let shapeImageSrc = await sheet.shapes.all()[0].toImageSrcAsync();
```

#### Returns

`Promise`<`string`\>

return the shape Image Base64 src string.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[toImageSrcAsync](GC.Spread.Sheets.Shapes.ShapeBase#toimagesrcasync)

___

### <a id="width" name="width"></a> width

▸ **width**(`value?`): `any`

Gets or sets the width of the shape.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.width();
heart.width(n + 50);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` \| `number` | The width of the shape specified by a number or formula (starts with =) can get a number value. |

#### Returns

`any`

If no value is set, returns the width of the shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[width](GC.Spread.Sheets.Shapes.ShapeBase#width)

___

### <a id="x" name="x"></a> x

▸ **x**(`value?`): `any`

Gets or sets the horizontal location of the shape.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.x();
heart.x(n + 50);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` \| `number` | The horizontal location of the shape specified by a number or formula (starts with =) can get a number value. |

#### Returns

`any`

If no value is set, returns the horizontal location of the shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[x](GC.Spread.Sheets.Shapes.ShapeBase#x)

___

### <a id="y" name="y"></a> y

▸ **y**(`value?`): `any`

Gets or sets the vertical location of the shape.

**`example`**
```javascript
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.y();
heart.y(n + 50);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` \| `number` | The vertical location of the shape specified by a number or formula (starts with =) can get a number value. |

#### Returns

`any`

If no value is set, returns the vertical location of the shape.

#### Inherited from

[ShapeBase](GC.Spread.Sheets.Shapes.ShapeBase).[y](GC.Spread.Sheets.Shapes.ShapeBase#y)

___

### <a id="zindex" name="zindex"></a> zIndex

▸ **zIndex**(`shapeName`, `zIndex?`): `any`

 Get or set the z-index for a shape in a groupShape.

**`example`**
```javascript
//This is a sample shows how to use zIndex in groupShape.
var shape1 = activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
var shape2 = activeSheet.shapes.add("shape2", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 150, 50, 100, 150);
var style = shape1.style();
style.fill.color = "red";
shape1.style(style);
var myGroup = activeSheet.shapes.group([shape1, shape2]);
myGroup.zIndex("shape2"); // 1
myGroup.zIndex("shape2", 0);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `shapeName` | `string` | The name of the shape. |
| `zIndex?` | `number` | The z-index for the shape. The zIndex should be between 0 to all shapes length(not contains). A shape with greater zIndex is always in front of a shape with a lower zIndex. |

#### Returns

`any`
