# ChartHandle.moveTo Method

> ChartHandle.moveTo method in the TX Sheet Control JavaScript API for Node.js: Move the chart to a cell anchor. Includes the syntax and a JavaScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Sheet Control > API Reference > JavaScript API > Node.js Server > ChartHandle > ChartHandle.moveTo Method
- **647 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/charthandle/moveto-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/charthandle/moveto-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/charthandle/moveto-method/llms-full.txt

---

Move the chart to a cell anchor.

Owner: [ChartHandle](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/charthandle/llms-full.txt). Package: `@txtextcontrol/tx-sheet-control-server`. Version: **2.0.0**.

### Syntax

```javascript
owner.moveTo(anchor)
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `anchor` | `Anchor` | No | Cell anchor with unscaled pixel offsets. |

### Return Value

`Chart`.

This handle for fluent operations.

### Exceptions

| Exception | Condition |
|---|---|
| `RangeError` | The address, scope or handle is invalid or stale. |

### Examples

Use a fresh sample workbook for this example. In the browser pass editor.workbook; in Node.js pass the server control. Document-bound objects are obtained from that same owner.

```javascript
function applyChartHandleMoveTo(control) {
    const book = control.workbook;
    const sheet = book.sheets.at(0);
    sheet.range('A1:B5').setValues([
        ['Region', 'Revenue'],
        ['North', 42000],
        ['South', 38500],
        ['East', 31200],
        ['West', 44900],
    ]);

    const chart = sheet.charts.add({
        type: 'column',
        dataRange: 'A1:B5',
        title: 'Revenue by region',
        anchor: { cell: 'F2' },
    });

    const result = chart.moveTo({ cell: 'F2' });
    return result;
}
```

### Remarks

Use this member on an object from the current document. Reacquire document-bound handles after replacement/deletion. Validate arguments against the declared types and documented bounds; handle exceptions or rejected promises.

### See Also

- [ChartHandle Class](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/charthandle/llms-full.txt)
- [Charts and Sparklines](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/charts/llms-full.txt)
- [Anchor Interface](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/anchor/llms-full.txt)
- [Chart Interface](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/chart/llms-full.txt)

---

## Nearby

- **Previous:** [ChartHandle.id Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/charthandle/id-property/llms-full.txt)
- **Next:** [ChartHandle.remove Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/charthandle/remove-method/llms-full.txt)
