# 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/ko/docs/methods/connect/

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

## 정의

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

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `charts` | `ReadonlyArray<HTMLElement \| string>` | 필수 |
| `options` | `ZoomConnectOptions` | 선택 |

반환 타입: `Promise<number>`. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

- [ZoomConnectOptions](https://chart.syidax.com/ko/docs/types/ZoomConnectOptions.md) — 타입 정의

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

## 관련 차트


