# connect

link this chart's zoom / pan with other charts (elements or ids in this chart's root): every member's `zoomChange` reaches the others as `zoomTo({ source: 'sync' })` on the `axes` (default `'x'`). A newcomer is aligned to this chart. Calling again replaces the link.

Canonical: https://chart.syidax.com/docs/methods/connect/

<a id="definition"></a>

## Definition

```typescript
connect(charts: ReadonlyArray<HTMLElement | string>, options?: ZoomConnectOptions): Promise<number>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `charts` | `ReadonlyArray<HTMLElement \| string>` | Required |
| `options` | `ZoomConnectOptions` | Optional |

Return type: `Promise<number>`. Call the method after element registration and await its Promise result.

- [ZoomConnectOptions](https://chart.syidax.com/docs/types/ZoomConnectOptions.md) — Type definition

<a id="related"></a>

## Related charts


