# GC.Spread.Sheets.Slicers.DOMTableSlicer

## Content

# Class: DOMTableSlicer

[Sheets](../modules/GC.Spread.Sheets).[Slicers](../modules/GC.Spread.Sheets.Slicers).DOMTableSlicer

## Hierarchy

- [`FloatingObject`](GC.Spread.Sheets.FloatingObjects.FloatingObject)

  ↳ **`DOMTableSlicer`**

## Table of contents

### Constructors

- [constructor](GC.Spread.Sheets.Slicers.DOMTableSlicer#constructor)

### Properties

- [typeName](GC.Spread.Sheets.Slicers.DOMTableSlicer#typename)

### Methods

- [allowMove](GC.Spread.Sheets.Slicers.DOMTableSlicer#allowmove)
- [allowResize](GC.Spread.Sheets.Slicers.DOMTableSlicer#allowresize)
- [alt](GC.Spread.Sheets.Slicers.DOMTableSlicer#alt)
- [captionName](GC.Spread.Sheets.Slicers.DOMTableSlicer#captionname)
- [cloneContent](GC.Spread.Sheets.Slicers.DOMTableSlicer#clonecontent)
- [columnCount](GC.Spread.Sheets.Slicers.DOMTableSlicer#columncount)
- [content](GC.Spread.Sheets.Slicers.DOMTableSlicer#content)
- [disableResizingAndMoving](GC.Spread.Sheets.Slicers.DOMTableSlicer#disableresizingandmoving)
- [dynamicMove](GC.Spread.Sheets.Slicers.DOMTableSlicer#dynamicmove)
- [dynamicSize](GC.Spread.Sheets.Slicers.DOMTableSlicer#dynamicsize)
- [endColumn](GC.Spread.Sheets.Slicers.DOMTableSlicer#endcolumn)
- [endColumnOffset](GC.Spread.Sheets.Slicers.DOMTableSlicer#endcolumnoffset)
- [endRow](GC.Spread.Sheets.Slicers.DOMTableSlicer#endrow)
- [endRowOffset](GC.Spread.Sheets.Slicers.DOMTableSlicer#endrowoffset)
- [fixedPosition](GC.Spread.Sheets.Slicers.DOMTableSlicer#fixedposition)
- [getHost](GC.Spread.Sheets.Slicers.DOMTableSlicer#gethost)
- [height](GC.Spread.Sheets.Slicers.DOMTableSlicer#height)
- [isLocked](GC.Spread.Sheets.Slicers.DOMTableSlicer#islocked)
- [isSelected](GC.Spread.Sheets.Slicers.DOMTableSlicer#isselected)
- [isVisible](GC.Spread.Sheets.Slicers.DOMTableSlicer#isvisible)
- [itemHeight](GC.Spread.Sheets.Slicers.DOMTableSlicer#itemheight)
- [name](GC.Spread.Sheets.Slicers.DOMTableSlicer#name)
- [refreshContent](GC.Spread.Sheets.Slicers.DOMTableSlicer#refreshcontent)
- [showHeader](GC.Spread.Sheets.Slicers.DOMTableSlicer#showheader)
- [showNoDataItems](GC.Spread.Sheets.Slicers.DOMTableSlicer#shownodataitems)
- [showNoDataItemsInLast](GC.Spread.Sheets.Slicers.DOMTableSlicer#shownodataitemsinlast)
- [sortState](GC.Spread.Sheets.Slicers.DOMTableSlicer#sortstate)
- [startColumn](GC.Spread.Sheets.Slicers.DOMTableSlicer#startcolumn)
- [startColumnOffset](GC.Spread.Sheets.Slicers.DOMTableSlicer#startcolumnoffset)
- [startRow](GC.Spread.Sheets.Slicers.DOMTableSlicer#startrow)
- [startRowOffset](GC.Spread.Sheets.Slicers.DOMTableSlicer#startrowoffset)
- [style](GC.Spread.Sheets.Slicers.DOMTableSlicer#style)
- [visuallyNoDataItems](GC.Spread.Sheets.Slicers.DOMTableSlicer#visuallynodataitems)
- [width](GC.Spread.Sheets.Slicers.DOMTableSlicer#width)
- [x](GC.Spread.Sheets.Slicers.DOMTableSlicer#x)
- [y](GC.Spread.Sheets.Slicers.DOMTableSlicer#y)

## Constructors

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

• **new DOMTableSlicer**(`name`, `table`, `columnName`)

Represents a slicer.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The slicer name. |
| `table` | [`Table`](GC.Spread.Sheets.Tables.Table) | The table that relates to the slicer. |
| `columnName` | `string` | The name of the table's column. |

#### Overrides

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[constructor](GC.Spread.Sheets.FloatingObjects.FloatingObject#constructor)

## Properties

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

• **typeName**: `string`

Represents the type name string used for supporting serialization.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[typeName](GC.Spread.Sheets.FloatingObjects.FloatingObject#typename)

## Methods

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

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

Gets or sets whether to disable moving the floating object.

**`example`**
```
//This example prevents you from moving or resizing the floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.allowResize(false);
customFloatingObject.allowMove(false);
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the setting for whether to disable moving the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[allowMove](GC.Spread.Sheets.FloatingObjects.FloatingObject#allowmove)

___

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

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

Gets or sets whether to disable resizing the floating object.

**`example`**
```
//This example prevents you from moving or resizing the floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.allowResize(false);
customFloatingObject.allowMove(false);
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The setting for whether to disable resizing the floating object. |

#### Returns

`any`

If no value is set, returns the setting for whether to disable resizing the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[allowResize](GC.Spread.Sheets.FloatingObjects.FloatingObject#allowresize)

___

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

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

Gets or sets the alternative text of the floating object for screen readers.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The alternative text of the floating object. |

#### Returns

`any`

The alternative text of the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[alt](GC.Spread.Sheets.FloatingObjects.FloatingObject#alt)

___

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

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

Gets or sets the caption name of the slicer.

**`example`**
```
//This example uses the captionName method.
//create a table
datas = [
    ["1", "NewYork", "1968/6/8", "80", "180"],
    ["4", "NewYork", "1972/7/3", "72", "168"],
    ["4", "NewYork", "1964/3/2", "71", "179"],
    ["5", "Washington", "1972/8/8","80", "171"],
    ["6", "Washington", "1986/2/2", "89", "161"],
    ["7", "Washington", "2012/2/15", "71", "240"]];
var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
table.setColumnName(0, dataColumns[0]);
table.setColumnName(1, dataColumns[1]);
table.setColumnName(2, dataColumns[2]);
table.setColumnName(3, dataColumns[3]);
table.setColumnName(4, dataColumns[4]);
//slicer style
var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light4();
//add a slicer to the sheet and return the slicer instance.
var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
 //change the slicer properties.
slicer.position(new GC.Spread.Sheets.Point(100, 200));
slicer.captionName("S1");
slicer.style(style1);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the caption name of the slicer; otherwise, returns the slicer.

___

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

▸ **cloneContent**(): `HTMLElement`

Gets a copy of the current content of the instance.

#### Returns

`HTMLElement`

A copy of the current content of the instance.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[cloneContent](GC.Spread.Sheets.FloatingObjects.FloatingObject#clonecontent)

___

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

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

Gets or sets the column count for the slicer.

#### Parameters

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

#### Returns

`any`

If no value is set, returns the column count for the slicer; otherwise, returns the slicer.

___

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

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

Gets or sets the content of the custom floating object.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `HTMLElement` | The content of the custom floating object. |

#### Returns

`any`

If no value is set, returns the content of the custom floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[content](GC.Spread.Sheets.FloatingObjects.FloatingObject#content)

___

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

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

Gets or sets whether to disable resizing and moving the slicer.

**`example`**
```
//This example prevents moving or resizing the slicer.
//create a table
datas = [
    ["1", "NewYork", "1968/6/8", "80", "180"],
    ["4", "NewYork", "1972/7/3", "72", "168"],
    ["4", "NewYork", "1964/3/2", "71", "179"],
    ["5", "Washington", "1972/8/8","80", "171"],
    ["6", "Washington", "1986/2/2", "89", "161"],
    ["7", "Washington", "2012/2/15", "71", "240"]];
var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
table.setColumnName(0, dataColumns[0]);
table.setColumnName(1, dataColumns[1]);
table.setColumnName(2, dataColumns[2]);
table.setColumnName(3, dataColumns[3]);
table.setColumnName(4, dataColumns[4]);
//slicer style
var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light4();
//add a slicer to the sheet and return the slicer instance.
var slicer = activeSheet.slicers.add("slicer1",table.name(),"Height");
//change the slicer properties.
slicer.position(new GC.Spread.Sheets.Point(100, 200));
slicer.disableResizingAndMoving(true);
slicer.style(style1);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether to disable resizing and moving the slicer; otherwise, returns the slicer.

___

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

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

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

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
customFloatingObject.isVisible(true);
customFloatingObject.dynamicSize(true);
customFloatingObject.dynamicMove(true);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether this floating object dynamically moves; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[dynamicMove](GC.Spread.Sheets.FloatingObjects.FloatingObject#dynamicmove)

___

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

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

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

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
customFloatingObject.isVisible(true);
customFloatingObject.dynamicSize(true);
customFloatingObject.dynamicMove(true);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether this floating object dynamically changes size; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[dynamicSize](GC.Spread.Sheets.FloatingObjects.FloatingObject#dynamicsize)

___

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

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

Gets or sets the end column index of the floating object position.

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//takes effect when added into the sheet.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
customFloatingObject.endRow(7);
customFloatingObject.endColumn(5);
customFloatingObject.endRowOffset(10);
customFloatingObject.endColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the end column index of the floating object position; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[endColumn](GC.Spread.Sheets.FloatingObjects.FloatingObject#endcolumn)

___

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

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

Gets or sets the offset relative to the end column of the floating object.

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//takes effect when added into the sheet.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
customFloatingObject.endRow(7);
customFloatingObject.endColumn(5);
customFloatingObject.endRowOffset(10);
customFloatingObject.endColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the offset relative to the end column of the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[endColumnOffset](GC.Spread.Sheets.FloatingObjects.FloatingObject#endcolumnoffset)

___

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

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

Gets or sets the end row index of the floating object position.

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//takes effect when added into the sheet.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
customFloatingObject.endRow(7);
customFloatingObject.endColumn(5);
customFloatingObject.endRowOffset(10);
customFloatingObject.endColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the end row index of the floating object position; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[endRow](GC.Spread.Sheets.FloatingObjects.FloatingObject#endrow)

___

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

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

Gets or sets the offset relative to the end row of the floating object.

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//takes effect when added into the sheet.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
customFloatingObject.endRow(7);
customFloatingObject.endColumn(5);
customFloatingObject.endRowOffset(10);
customFloatingObject.endColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the offset relative to the end row of the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[endRowOffset](GC.Spread.Sheets.FloatingObjects.FloatingObject#endrowoffset)

___

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

▸ **fixedPosition**(`value`): `any`

Gets or sets whether the position of the floating object is fixed. When fixedPosition is true, dynamicMove and dynamicSize are disabled.

**`example`**
```
//This example sets the position of the object to fixed.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
customFloatingObject.fixedPosition(true);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value` | `boolean` | The value indicates whether the position of the floating object is fixed. |

#### Returns

`any`

If no value is set, returns whether the position of the floating object is fixed; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[fixedPosition](GC.Spread.Sheets.FloatingObjects.FloatingObject#fixedposition)

___

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

▸ **getHost**(): `HTMLElement`[]

Gets the dom host of the custom content.

#### Returns

`HTMLElement`[]

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[getHost](GC.Spread.Sheets.FloatingObjects.FloatingObject#gethost)

___

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

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

Gets or sets the height of a floating object.

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
customFloatingObject.x(10);
customFloatingObject.y(10);
customFloatingObject.width(60);
customFloatingObject.height(64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The height of a floating object. |

#### Returns

`any`

If no value is set, returns the height of a floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[height](GC.Spread.Sheets.FloatingObjects.FloatingObject#height)

___

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

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

Gets or sets whether this floating object is locked.

**`example`**
```
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
customFloatingObject.x(10);
customFloatingObject.y(10);
customFloatingObject.width(60);
customFloatingObject.height(64);
customFloatingObject.isLocked(true);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
activeSheet.options.isProtected = true;
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether this floating object is locked; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[isLocked](GC.Spread.Sheets.FloatingObjects.FloatingObject#islocked)

___

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

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

Gets or sets whether this floating object is selected.

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
customFloatingObject.isSelected(true);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether this floating object is selected; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[isSelected](GC.Spread.Sheets.FloatingObjects.FloatingObject#isselected)

___

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

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

Gets or sets whether this floating object is visible.

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
customFloatingObject.isVisible(true);
customFloatingObject.dynamicSize(true);
customFloatingObject.dynamicMove(true);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether this floating object is visible; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[isVisible](GC.Spread.Sheets.FloatingObjects.FloatingObject#isvisible)

___

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

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

Gets or sets the item height for the slicer.

#### Parameters

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

#### Returns

`any`

If no value is set, returns the item height for the slicer; otherwise, returns the slicer.

___

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

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

Gets or sets the name of the slicer.

#### Parameters

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

#### Returns

`any`

If no value is set, returns the name of the slicer; otherwise, returns the slicer.

#### Overrides

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[name](GC.Spread.Sheets.FloatingObjects.FloatingObject#name)

___

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

▸ **refreshContent**(): `void`

Refresh the content in floatingObject.The user should override this method to make their content synchronize with the floatingObject.

#### Returns

`void`

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[refreshContent](GC.Spread.Sheets.FloatingObjects.FloatingObject#refreshcontent)

___

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

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

Gets or sets whether to show the slicer header.

**`example`**
```
//This example hides the slicer header.
//create a table
datas = [
    ["1", "NewYork", "1968/6/8", "80", "180"],
    ["4", "NewYork", "1972/7/3", "72", "168"],
    ["4", "NewYork", "1964/3/2", "71", "179"],
    ["5", "Washington", "1972/8/8","80", "171"],
    ["6", "Washington", "1986/2/2", "89", "161"],
    ["7", "Washington", "2012/2/15", "71", "240"]];
var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
table.setColumnName(0, dataColumns[0]);
table.setColumnName(1, dataColumns[1]);
table.setColumnName(2, dataColumns[2]);
table.setColumnName(3, dataColumns[3]);
table.setColumnName(4, dataColumns[4]);
//slicer style
var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light4();
//add a slicer to the sheet and return the slicer instance.
var slicer = activeSheet.slicers.add("slicer1",table.name(),"Height");
slicer.position(new GC.Spread.Sheets.Point(100, 200));
slicer.showHeader(false);
slicer.style(style1);
//add the slicer to the sheet
activeSheet.slicers.add(slicer);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether to show the slicer header; otherwise, returns the slicer.

___

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

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

Gets or sets whether to show the no data items of the slicer.

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether to show the no data items of the slicer; otherwise, returns the slicer.

___

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

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

Gets or sets whether to show the no data items last.

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether to show the no data items last; otherwise, returns the slicer.

___

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

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

Gets or sets the sort state of the slicer.

**`example`**
```
//This example sets the sort order of the items in the slicer.
//create a table
datas = [
    ["1", "NewYork", "1968/6/8", "80", "180"],
    ["4", "NewYork", "1972/7/3", "72", "168"],
    ["4", "NewYork", "1964/3/2", "71", "179"],
    ["5", "Washington", "1972/8/8","80", "171"],
    ["6", "Washington", "1986/2/2", "89", "161"],
    ["7", "Washington", "2012/2/15", "71", "240"]];
var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
table.setColumnName(0, dataColumns[0]);
table.setColumnName(1, dataColumns[1]);
table.setColumnName(2, dataColumns[2]);
table.setColumnName(3, dataColumns[3]);
table.setColumnName(4, dataColumns[4]);
// slicer style
var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light4();
//add a slicer to the sheet and return the slicer instance
var slicer = activeSheet.slicers.add("slicer1",table.name(),"Height");
//set slicer properties
slicer.position(new GC.Spread.Sheets.Point(100, 200));
slicer.sortState(GC.Spread.Sheets.SortState.descending);
slicer.style(style1);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the sort state of the slicer; otherwise, returns the slicer.

___

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

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

Gets or sets the starting column index of the floating object position.

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//takes effect when added into the sheet.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the starting column index of the floating object position; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[startColumn](GC.Spread.Sheets.FloatingObjects.FloatingObject#startcolumn)

___

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

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

Gets or sets the offset relative to the start column of the floating object.

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//takes effect when added into the sheet.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the offset relative to the start column of the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[startColumnOffset](GC.Spread.Sheets.FloatingObjects.FloatingObject#startcolumnoffset)

___

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

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

Gets or sets the starting row index of the floating object position.

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//takes effect when added into the sheet.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the starting row index of the floating object position; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[startRow](GC.Spread.Sheets.FloatingObjects.FloatingObject#startrow)

___

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

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

Gets or sets the offset relative to the start row of the floating object.

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//takes effect when added into the sheet.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the offset relative to the start row of the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[startRowOffset](GC.Spread.Sheets.FloatingObjects.FloatingObject#startrowoffset)

___

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

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

Gets or sets the style of the slicer.

**`example`**
```
//This example uses a built-in style.
//create a table
datas = [
    ["1", "NewYork", "1968/6/8", "80", "180"],
    ["4", "NewYork", "1972/7/3", "72", "168"],
    ["4", "NewYork", "1964/3/2", "71", "179"],
    ["5", "Washington", "1972/8/8","80", "171"],
    ["6", "Washington", "1986/2/2", "89", "161"],
    ["7", "Washington", "2012/2/15", "71", "240"]];
var table = activeSheet.tables.addFromDataSource("table1", 2, 2, datas);
dataColumns = ["Name", "City", "Birthday", "Weight", "Height"];
table.setColumnName(0, dataColumns[0]);
table.setColumnName(1, dataColumns[1]);
table.setColumnName(2, dataColumns[2]);
table.setColumnName(3, dataColumns[3]);
table.setColumnName(4, dataColumns[4]);
// slicer style
var style1 = new GC.Spread.Sheets.Slicers.SlicerStyles.light4();
//add a slicer to the sheet and return the slicer instance.
var slicer = activeSheet.slicers.add("slicer1",table.name(),"Name");
//change the slicer properties.
slicer.position(new GC.Spread.Sheets.Point(100, 200));
slicer.style(style1);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | [`SlicerStyle`](GC.Spread.Sheets.Slicers.SlicerStyle) | The style of the slicer. |

#### Returns

`any`

If no value is set, returns The style of the slicer; otherwise, returns the slicer.

___

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

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

Gets or sets whether to visually distinguish the items with no data.

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether to visually distinguish the items with no data; otherwise, returns the slicer.

___

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

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

Gets or sets the width of a floating object.

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
customFloatingObject.x(10);
customFloatingObject.y(10);
customFloatingObject.width(60);
customFloatingObject.height(64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The width of a floating object. |

#### Returns

`any`

If no value is set, returns the width of a floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[width](GC.Spread.Sheets.FloatingObjects.FloatingObject#width)

___

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

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

Gets or sets the horizontal location of the floating object.

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
customFloatingObject.x(10);
customFloatingObject.y(10);
customFloatingObject.width(60);
customFloatingObject.height(64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The horizontal location of the floating object. |

#### Returns

`any`

If no value is set, returns the horizontal location of the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[x](GC.Spread.Sheets.FloatingObjects.FloatingObject#x)

___

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

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

Gets or sets the vertical location of the floating object.

**`example`**
```
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
customFloatingObject.x(10);
customFloatingObject.y(10);
customFloatingObject.width(60);
customFloatingObject.height(64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The vertical location of the floating object. |

#### Returns

`any`

If no value is set, returns the vertical location of the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[y](GC.Spread.Sheets.FloatingObjects.FloatingObject#y)
