# Tilemap

동일한 크기의 타일로 위치와 값을 비교합니다.

Canonical: https://chart.syidax.com/ko/docs/components/tilemap/

<a id="overview"></a>

## sy-tilemap

행정구역이나 논리적 영역을 정규화해 보여주세요.

타일 좌표는 실제 지리적 면적이나 거리를 뜻하지 않습니다. 배치의 의미를 설명하세요.

기본 차트 등급: Community. 추가 렌더러·커스텀 브랜딩 등 기능의 권한은 별도입니다.

| 입력 | 데이터 설명 |
| --- | --- |
| `data` | { x, y, value?, name?, label? } 배열입니다. |
| `tileShape` | 타일의 모양입니다. |
| `colorAxis` | 연속 수치에 auto 색상 축을 사용할 수 있습니다. |

- [Components에서 실행하기](https://chart.syidax.com/charts/tilemap) — 옵션 변경과 프레임워크별 코드
- [공통 설치와 연결](https://chart.syidax.com/ko/docs/getting-started.md)

<a id="example"></a>

## 전체 적용 예제

```html
<div id="chart-container" style="width: 100%; min-width: 0;"></div>

<script type="module">
  import { defineCustomElement as define0 } from '@syidax/advanced/components/sy-tilemap.js';
  define0();

  const specs = [
    {
      "id": "example-chart",
      "tag": "sy-tilemap",
      "props": {
        "engine": "standard",
        "data": [
          {
            "x": 0,
            "y": 0,
            "name": "구역 1",
            "label": "1",
            "value": 20
          },
          {
            "x": 1,
            "y": 0,
            "name": "구역 2",
            "label": "2",
            "value": 33
          },
          {
            "x": 2,
            "y": 0,
            "name": "구역 3",
            "label": "3",
            "value": 46
          },
          {
            "x": 3,
            "y": 0,
            "name": "구역 4",
            "label": "4",
            "value": 59
          },
          {
            "x": 4,
            "y": 0,
            "name": "구역 5",
            "label": "5",
            "value": 72
          },
          {
            "x": 0,
            "y": 1,
            "name": "구역 6",
            "label": "6",
            "value": 85
          },
          {
            "x": 1,
            "y": 1,
            "name": "구역 7",
            "label": "7",
            "value": 98
          },
          {
            "x": 2,
            "y": 1,
            "name": "구역 8",
            "label": "8",
            "value": 31
          },
          {
            "x": 3,
            "y": 1,
            "name": "구역 9",
            "label": "9",
            "value": 44
          },
          {
            "x": 4,
            "y": 1,
            "name": "구역 10",
            "label": "10",
            "value": 57
          },
          {
            "x": 0,
            "y": 2,
            "name": "구역 11",
            "label": "11",
            "value": 70
          },
          {
            "x": 1,
            "y": 2,
            "name": "구역 12",
            "label": "12",
            "value": 83
          },
          {
            "x": 2,
            "y": 2,
            "name": "구역 13",
            "label": "13",
            "value": 96
          },
          {
            "x": 3,
            "y": 2,
            "name": "구역 14",
            "label": "14",
            "value": 29
          },
          {
            "x": 4,
            "y": 2,
            "name": "구역 15",
            "label": "15",
            "value": 42
          },
          {
            "x": 0,
            "y": 3,
            "name": "구역 16",
            "label": "16",
            "value": 55
          },
          {
            "x": 1,
            "y": 3,
            "name": "구역 17",
            "label": "17",
            "value": 68
          },
          {
            "x": 2,
            "y": 3,
            "name": "구역 18",
            "label": "18",
            "value": 81
          },
          {
            "x": 3,
            "y": 3,
            "name": "구역 19",
            "label": "19",
            "value": 94
          },
          {
            "x": 4,
            "y": 3,
            "name": "구역 20",
            "label": "20",
            "value": 27
          }
        ],
        "tileShape": "hexagon",
        "colorAxis": "auto",
        "width": 640,
        "height": 360,
        "brandPosition": "bottom-right",
        "brandLogo": ""
      }
    }
  ];
  const container = document.querySelector('#chart-container');
  const elements = specs.map(({ tag, id, props }) => {
    const element = document.createElement(tag);
    element.id = id;
    Object.assign(element, props);
    element.setAttribute('aria-label', 'tilemap 예제 차트');
    return element;
  });
  container.replaceChildren(...elements);
  const chart = elements.at(-1);
  const onEvent = event => {
    console.log('pointClick', event.detail);
  };
  chart.addEventListener('pointClick', onEvent);
  const observer = new ResizeObserver(([entry]) => {
    const width = Math.max(160, Math.floor(entry.contentRect.width));
    elements.forEach(element => { element.width = width; });
  });
  observer.observe(container);

  // SPA에서는 화면이 해제될 때 이 함수를 호출하세요.
  function disposeChart() {
    observer.disconnect();
    chart.removeEventListener('pointClick', onEvent);
    container.replaceChildren();
  }
</script>
```

<a id="props"></a>

## Properties

<a id="property-data"></a>

### data

{ x, y, value?, name?, label? } 배열입니다.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `data` |
| HTML attribute | 객체·배열·콜백은 JavaScript 프로퍼티로 전달 |
| 타입 | `TilemapData` |
| 기본값 | `[]` |

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

<a id="property-width"></a>

### width

차트의 너비를 px 단위로 지정합니다. 컨테이너 너비가 변하는 앱에서는 ResizeObserver에서 width를 갱신하세요.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `width` |
| HTML attribute | `width` |
| 타입 | `number` |
| 기본값 | `640` |

<a id="property-height"></a>

### height

차트의 높이를 px 단위로 지정합니다. 축, 제목과 범례가 차지하는 공간을 함께 고려하세요.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `height` |
| HTML attribute | `height` |
| 타입 | `number` |
| 기본값 | `420` |

<a id="property-brandLogo"></a>

### brandLogo

기본값은 Syidax 심볼과 워드마크입니다. Pro의 chart.branding 권한으로 none을 지정해 제거하거나 PNG·JPEG·WebP data URL로 교체할 수 있습니다.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `brandLogo` |
| HTML attribute | `brand-logo` |
| 타입 | `string` |
| 기본값 | `undefined` |

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

<a id="property-brandPosition"></a>

### brandPosition

로고를 고정할 코너입니다. Community·Pro 모두 네 코너 중 하나를 선택할 수 있으며 화면과 이미지 내보내기에 같은 위치를 사용합니다.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `brandPosition` |
| HTML attribute | `brand-position` |
| 타입 | `'top-left' \| 'top-right' \| 'bottom-left' \| 'bottom-right'` |
| 기본값 | `'bottom-right'` |
| 허용값 | `top-left`, `top-right`, `bottom-left`, `bottom-right` |

<a id="property-palette"></a>

### palette

허용값: tableau10, tableau20, observable10, paired12, set3_12. 기본값: 'tableau10'.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `palette` |
| HTML attribute | `palette` |
| 타입 | `TilemapPaletteName` |
| 기본값 | `'tableau10'` |
| 허용값 | `tableau10`, `tableau20`, `observable10`, `paired12`, `set3_12` |

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

<a id="property-colors"></a>

### colors

JavaScript 프로퍼티로 전달합니다. 타입: ReadonlyArray<string>.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `colors` |
| HTML attribute | 객체·배열·콜백은 JavaScript 프로퍼티로 전달 |
| 타입 | `ReadonlyArray<string>` |
| 기본값 | `undefined` |

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

<a id="property-tileShape"></a>

### tileShape

타일의 모양입니다.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `tileShape` |
| HTML attribute | `tile-shape` |
| 타입 | `TilemapTileShape` |
| 기본값 | `'hexagon'` |
| 허용값 | `circle`, `square`, `diamond`, `hexagon` |

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

<a id="property-gap"></a>

### gap

Empty px kept between tiles.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `gap` |
| HTML attribute | `gap` |
| 타입 | `number` |
| 기본값 | `2` |

<a id="property-showLabels"></a>

### showLabels

Render each tile's `label` (falling back to `name`) inside the tile when it fits.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `showLabels` |
| HTML attribute | `show-labels` |
| 타입 | `boolean` |
| 기본값 | `true` |

<a id="property-colorAxis"></a>

### colorAxis

연속 수치에 auto 색상 축을 사용할 수 있습니다.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `colorAxis` |
| HTML attribute | 객체·배열·콜백은 JavaScript 프로퍼티로 전달 |
| 타입 | `TilemapColorAxisInput` |
| 기본값 | `undefined` |
| 타입에 포함된 리터럴 | `auto` |

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

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

<a id="property-colorLegend"></a>

### colorLegend

Show the colour-axis gradient legend under the map (on while the axis is on).

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `colorLegend` |
| HTML attribute | `color-legend` |
| 타입 | `boolean` |
| 기본값 | `true` |

<a id="property-legendPosition"></a>

### legendPosition

Storybook parity (2026-09-10) — where the colour legend sits: docked on an edge of the map (`top` / `bottom` / `left` / `right`; the band is taken off the map) or `float` — an overlay box inside the drawing rectangle anchored by `legend-float-align` / `legend-float-vertical-align`. The line chart's legend contract.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `legendPosition` |
| HTML attribute | `legend-position` |
| 타입 | `TilemapLegendPosition` |
| 기본값 | `'bottom'` |
| 허용값 | `top`, `bottom`, `left`, `right`, `float` |

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

<a id="property-legendFloatAlign"></a>

### legendFloatAlign

`legend-position="float"`: the overlay's horizontal anchor inside the drawing rectangle.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `legendFloatAlign` |
| HTML attribute | `legend-float-align` |
| 타입 | `'start' \| 'center' \| 'end'` |
| 기본값 | `'end'` |
| 허용값 | `start`, `center`, `end` |

<a id="property-legendFloatVerticalAlign"></a>

### legendFloatVerticalAlign

`legend-position="float"`: the overlay's vertical anchor inside the drawing rectangle.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `legendFloatVerticalAlign` |
| HTML attribute | `legend-float-vertical-align` |
| 타입 | `'top' \| 'middle' \| 'bottom'` |
| 기본값 | `'top'` |
| 허용값 | `top`, `bottom`, `middle` |

<a id="property-legendDraggable"></a>

### legendDraggable

`legend-position="float"`: the floating legend can be dragged inside the chart bounds.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `legendDraggable` |
| HTML attribute | `legend-draggable` |
| 타입 | `boolean` |
| 기본값 | `false` |

<a id="property-labelColor"></a>

### labelColor

HTML attribute 또는 JavaScript 프로퍼티로 설정합니다. 타입: string.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `labelColor` |
| HTML attribute | `label-color` |
| 타입 | `string` |
| 기본값 | `'#ffffff'` |

<a id="property-chartTitle"></a>

### chartTitle

차트 내부 제목입니다. 데이터의 단위와 의미를 함께 설명하세요.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `chartTitle` |
| HTML attribute | `chart-title` |
| 타입 | `string` |
| 기본값 | `undefined` |

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

<a id="property-chartSubtitle"></a>

### chartSubtitle

차트 내부 부제목입니다.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `chartSubtitle` |
| HTML attribute | `chart-subtitle` |
| 타입 | `string` |
| 기본값 | `undefined` |

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

<a id="property-tooltipShow"></a>

### tooltipShow

내장 툴팁 표시 여부입니다.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `tooltipShow` |
| HTML attribute | `tooltip-show` |
| 타입 | `boolean` |
| 기본값 | `true` |

<a id="property-tooltipFormat"></a>

### tooltipFormat

JavaScript 프로퍼티로 전달합니다. 타입: (tile: TilemapResolvedTile) => string.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `tooltipFormat` |
| HTML attribute | 객체·배열·콜백은 JavaScript 프로퍼티로 전달 |
| 타입 | `(tile: TilemapResolvedTile) => string` |
| 기본값 | `undefined` |

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

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

<a id="property-tooltip"></a>

### tooltip

Rich tooltip configuration object — the tile-flavoured counterpart of the item `.tooltip` API (trigger/openMode/connector/draggable/interactive/ format/html/style/side/sizing). When set it wins over the flat `tooltip-show` / `tooltipFormat` props. Property-only.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `tooltip` |
| HTML attribute | 객체·배열·콜백은 JavaScript 프로퍼티로 전달 |
| 타입 | `TilemapTooltipInput` |
| 기본값 | `undefined` |
| 타입에 포함된 리터럴 | `auto`, `off` |

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

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

<a id="property-enableMouseTracking"></a>

### enableMouseTracking

HTML attribute 또는 JavaScript 프로퍼티로 설정합니다. 타입: boolean.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `enableMouseTracking` |
| HTML attribute | `enable-mouse-tracking` |
| 타입 | `boolean` |
| 기본값 | `true` |

<a id="property-zoom"></a>

### zoom

Viewport zoom — the `zoom` attribute the cartesian charts carry: a mode (`'x'` | `'y'` | `'xy'`), `true` (x) or an object; off by default. The drawing rectangle (the map between the title band and the colour legend) is the plot — x runs 0 → 1 left to right, y 0 → 1 bottom to top — and the tiles are magnified into the window; tiles outside it leave the rectangle. Property-only (a mode string also works as an attribute).

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `zoom` |
| HTML attribute | 객체·배열·콜백은 JavaScript 프로퍼티로 전달 |
| 타입 | `CartesianZoomInput` |
| 기본값 | `undefined` |
| 타입에 포함된 리터럴 | `auto`, `off`, `true`, `false`, `x`, `y`, `xy`, `inside` |

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

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

<a id="property-engine"></a>

### engine

auto·standard·pro 렌더러 선택입니다. 엔진 선택은 차트 종류의 Pro 사용 권한과 별개입니다.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `engine` |
| HTML attribute | `engine` |
| 타입 | `TilemapEngineMode` |
| 기본값 | `'auto'` |
| 허용값 | `auto`, `standard`, `pro` |

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

<a id="property-unavailable"></a>

### unavailable

허용값: fallback, error, throw. 기본값: 'fallback'.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `unavailable` |
| HTML attribute | `unavailable` |
| 타입 | `TilemapUnavailableBehaviour` |
| 기본값 | `'fallback'` |
| 허용값 | `fallback`, `error`, `throw` |

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

<a id="property-streamSource"></a>

### streamSource

실시간 데이터를 전달하는 스트림 소스입니다. 해당 타입의 계약을 확인하세요.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `streamSource` |
| HTML attribute | 객체·배열·콜백은 JavaScript 프로퍼티로 전달 |
| 타입 | `TilemapStreamSource` |
| 기본값 | `undefined` |

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

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

<a id="property-streamWindow"></a>

### streamWindow

화면에 유지할 스트리밍 데이터 구간입니다.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `streamWindow` |
| HTML attribute | `stream-window` |
| 타입 | `number` |
| 기본값 | `undefined` |

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

<a id="property-streamMax"></a>

### streamMax

보관할 스트리밍 데이터의 최대 수입니다.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `streamMax` |
| HTML attribute | `stream-max` |
| 타입 | `number` |
| 기본값 | `undefined` |

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

<a id="property-animated"></a>

### animated

초기 표시와 데이터 변경의 애니메이션 사용 여부입니다.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `animated` |
| HTML attribute | `animate` |
| 타입 | `boolean` |
| 기본값 | `false` |

<a id="property-animationDuration"></a>

### animationDuration

애니메이션 지속 시간(ms).

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `animationDuration` |
| HTML attribute | `animation-duration` |
| 타입 | `number` |
| 기본값 | `600` |

<a id="property-animationEasing"></a>

### animationEasing

허용값: linear, ease-out, ease-in, ease-in-out. 기본값: 'ease-out'.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `animationEasing` |
| HTML attribute | `animation-easing` |
| 타입 | `TilemapEasing` |
| 기본값 | `'ease-out'` |
| 허용값 | `linear`, `ease-out`, `ease-in`, `ease-in-out` |

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

<a id="property-animationType"></a>

### animationType

허용값: initial, update. 기본값: undefined.

| 항목 | 값 |
| --- | --- |
| JavaScript 프로퍼티 | `animationType` |
| HTML attribute | `animation-type` |
| 타입 | `TilemapAnimationType` |
| 기본값 | `undefined` |
| 허용값 | `initial`, `update` |

undefined는 이 속성을 명시하지 않은 상태입니다. 실제 표시 값은 차트 종류와 다른 설정에 따라 결정될 수 있습니다.

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

<a id="events"></a>

## Events

<a id="event-rendered"></a>

### rendered

차트 그리기가 완료되면 렌더링 결과를 detail로 전달합니다.

이벤트 이름: `rendered`. 대소문자를 구분합니다. payload는 `CustomEvent<TilemapRenderResult & { tier: TilemapEngineTier }>`의 `detail`에서 읽습니다.

```javascript
chart.addEventListener('rendered', event => {
  console.log(event.detail); // TilemapRenderResult & { tier: TilemapEngineTier }
});
```

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

<a id="event-pointClick"></a>

### pointClick

점 선택 이벤트입니다. CustomEvent.detail에서 선택한 데이터와 인덱스를 읽습니다.

이벤트 이름: `pointClick`. 대소문자를 구분합니다. payload는 `CustomEvent<TilemapPointEventDetail>`의 `detail`에서 읽습니다.

```javascript
chart.addEventListener('pointClick', event => {
  console.log(event.detail); // TilemapPointEventDetail
});
```

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

<a id="event-pointHover"></a>

### pointHover

CustomEvent.detail 타입: TilemapPointEventDetail | null. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: `pointHover`. 대소문자를 구분합니다. payload는 `CustomEvent<TilemapPointEventDetail | null>`의 `detail`에서 읽습니다.

```javascript
chart.addEventListener('pointHover', event => {
  console.log(event.detail); // TilemapPointEventDetail | null
});
```

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

<a id="event-pointContextMenu"></a>

### pointContextMenu

CustomEvent.detail 타입: ChartPointContextMenuEventDetail<TilemapPointEventDetail>. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: `pointContextMenu`. 대소문자를 구분합니다. payload는 `CustomEvent<ChartPointContextMenuEventDetail<TilemapPointEventDetail>>`의 `detail`에서 읽습니다.

```javascript
chart.addEventListener('pointContextMenu', event => {
  console.log(event.detail); // ChartPointContextMenuEventDetail<TilemapPointEventDetail>
});
```

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

<a id="event-appended"></a>

### appended

CustomEvent.detail 타입: { count: number }. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: `appended`. 대소문자를 구분합니다. payload는 `CustomEvent<{ count: number }>`의 `detail`에서 읽습니다.

```javascript
chart.addEventListener('appended', event => {
  console.log(event.detail); // { count: number }
});
```

<a id="event-windowSlid"></a>

### windowSlid

CustomEvent.detail 타입: { dropped: number }. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: `windowSlid`. 대소문자를 구분합니다. payload는 `CustomEvent<{ dropped: number }>`의 `detail`에서 읽습니다.

```javascript
chart.addEventListener('windowSlid', event => {
  console.log(event.detail); // { dropped: number }
});
```

<a id="event-chartAnimationStart"></a>

### chartAnimationStart

CustomEvent.detail 타입: void. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: `chartAnimationStart`. 대소문자를 구분합니다. payload는 `CustomEvent<void>`의 `detail`에서 읽습니다.

```javascript
chart.addEventListener('chartAnimationStart', event => {
  console.log(event.detail); // void
});
```

<a id="event-chartAnimationEnd"></a>

### chartAnimationEnd

CustomEvent.detail 타입: void. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: `chartAnimationEnd`. 대소문자를 구분합니다. payload는 `CustomEvent<void>`의 `detail`에서 읽습니다.

```javascript
chart.addEventListener('chartAnimationEnd', event => {
  console.log(event.detail); // void
});
```

<a id="event-chartAnimationInterrupted"></a>

### chartAnimationInterrupted

CustomEvent.detail 타입: void. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: `chartAnimationInterrupted`. 대소문자를 구분합니다. payload는 `CustomEvent<void>`의 `detail`에서 읽습니다.

```javascript
chart.addEventListener('chartAnimationInterrupted', event => {
  console.log(event.detail); // void
});
```

<a id="event-tooltipShow"></a>

### tooltipShow

내장 툴팁 표시 여부입니다.

이벤트 이름: `tooltipShow`. 대소문자를 구분합니다. payload는 `CustomEvent<TilemapTooltipShowEventDetail>`의 `detail`에서 읽습니다.

```javascript
chart.addEventListener('tooltipShow', event => {
  console.log(event.detail); // TilemapTooltipShowEventDetail
});
```

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

<a id="event-tooltipHide"></a>

### tooltipHide

CustomEvent.detail 타입: void. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: `tooltipHide`. 대소문자를 구분합니다. payload는 `CustomEvent<void>`의 `detail`에서 읽습니다.

```javascript
chart.addEventListener('tooltipHide', event => {
  console.log(event.detail); // void
});
```

<a id="event-tooltipAction"></a>

### tooltipAction

CustomEvent.detail 타입: TilemapTooltipActionEventDetail. 이벤트 이름은 대소문자를 구분합니다.

이벤트 이름: `tooltipAction`. 대소문자를 구분합니다. payload는 `CustomEvent<TilemapTooltipActionEventDetail>`의 `detail`에서 읽습니다.

```javascript
chart.addEventListener('tooltipAction', event => {
  console.log(event.detail); // TilemapTooltipActionEventDetail
});
```

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

<a id="event-zoomChange"></a>

### zoomChange

Every zoom / pan change (drag, pan, wheel, pinch, keyboard, API, reset).

이벤트 이름: `zoomChange`. 대소문자를 구분합니다. payload는 `CustomEvent<CartesianZoomChangeEventDetail>`의 `detail`에서 읽습니다.

```javascript
chart.addEventListener('zoomChange', event => {
  console.log(event.detail); // CartesianZoomChangeEventDetail
});
```

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

<a id="methods"></a>

## Methods

<a id="method-redraw"></a>

### redraw

현재 데이터와 옵션으로 차트를 다시 그립니다. 반환되는 Promise가 완료되면 렌더링 결과를 확인할 수 있습니다.

```typescript
redraw(): Promise<TilemapRenderResult>
```

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

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

<a id="method-getActiveTier"></a>

### getActiveTier

비동기 메서드입니다. 아래 인수 타입과 반환 타입을 확인하세요.

```typescript
getActiveTier(): Promise<TilemapEngineTier>
```

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

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

<a id="method-addTile"></a>

### addTile

Tilemap-only — append a tile datum (occupied cells update in place).

```typescript
addTile(datum: TilemapDatum): Promise<number>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `datum` | `TilemapDatum` | 필수 |

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

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

<a id="method-removeTile"></a>

### removeTile

Tilemap-only — remove a tile by id, name, index, or `{x, y}` cell.

```typescript
removeTile(idOrCell: string | number | { x: number; y: number }): Promise<boolean>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `idOrCell` | `string \| number \| { x: number; y: number }` | 필수 |

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

<a id="method-updateTile"></a>

### updateTile

Tilemap-only — patch a tile's datum fields.

```typescript
updateTile(idOrCell: string | number | { x: number; y: number }, patch: Partial<TilemapDatum>): Promise<boolean>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `idOrCell` | `string \| number \| { x: number; y: number }` | 필수 |
| `patch` | `Partial<TilemapDatum>` | 필수 |

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

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

<a id="method-setTileValue"></a>

### setTileValue

Tilemap-only — set a tile's metric value.

```typescript
setTileValue(idOrCell: string | number | { x: number; y: number }, value: number): Promise<boolean>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `idOrCell` | `string \| number \| { x: number; y: number }` | 필수 |
| `value` | `number` | 필수 |

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

<a id="method-appendPoint"></a>

### appendPoint

스트림에 값 하나를 추가합니다. 메서드 인수 타입과 스트리밍 기능의 라이선스 조건을 확인하세요.

```typescript
appendPoint(datum: TilemapDatum): Promise<void>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `datum` | `TilemapDatum` | 필수 |

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

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

<a id="method-appendBatch"></a>

### appendBatch

스트림에 여러 값을 한 번에 추가합니다. 메서드 인수 타입과 스트리밍 기능의 라이선스 조건을 확인하세요.

```typescript
appendBatch(datums: ReadonlyArray<TilemapDatum>): Promise<void>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `datums` | `ReadonlyArray<TilemapDatum>` | 필수 |

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

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

<a id="method-shift"></a>

### shift

Drops the OLDEST tiles (insertion order — a map has no value ranking).

```typescript
shift(count?: number): Promise<void>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `count` | `number` | 선택 |

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

<a id="method-replace"></a>

### replace

Swap the streamed set (`replace([])` clears it); the base `values` never leave. Without `chart.streaming` the dies upsert into the base like a batch (quietly: no `appended`, no `binChanged`, as a ring replace).

```typescript
replace(datums: ReadonlyArray<TilemapDatum>): Promise<void>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `datums` | `ReadonlyArray<TilemapDatum>` | 필수 |

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

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

<a id="method-getStreamSource"></a>

### getStreamSource

The stream session's source (Chart Pro): like the stream methods it waits for a license still being confirmed.

```typescript
getStreamSource(): Promise<TilemapStreamSource | undefined>
```

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

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

<a id="method-setAnimation"></a>

### setAnimation

비동기 메서드입니다. 아래 인수 타입과 반환 타입을 확인하세요.

```typescript
setAnimation(options: { duration?: number; easing?: TilemapEasing; enabled?: boolean; type?: TilemapAnimationType }): Promise<void>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `options` | `{ duration?: number; easing?: TilemapEasing; enabled?: boolean; type?: TilemapAnimationType }` | 필수 |

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

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

<a id="method-pauseAnimation"></a>

### pauseAnimation

진행 중인 애니메이션을 일시 정지합니다.

```typescript
pauseAnimation(): Promise<void>
```

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

<a id="method-resumeAnimation"></a>

### resumeAnimation

일시 정지한 애니메이션을 다시 진행합니다.

```typescript
resumeAnimation(): Promise<void>
```

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

<a id="method-replayAnimation"></a>

### replayAnimation

Replay the initial staggered reveal. No-op when animation is off.

```typescript
replayAnimation(): Promise<void>
```

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

<a id="method-hitTestTile"></a>

### hitTestTile

The tile under a host px position (the zoomed view is honoured: the point is taken back to the layout first).

```typescript
hitTestTile(cssX: number, cssY: number): Promise<{ index: number; id: string; col: number; row: number; name: string } | null>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `cssX` | `number` | 필수 |
| `cssY` | `number` | 필수 |

반환 타입: `Promise<{ index: number; id: string; col: number; row: number; name: string } | null>`. 요소 등록이 끝난 뒤 메서드를 호출하고 Promise 결과를 await로 기다리세요.

<a id="method-showTooltipAtTile"></a>

### showTooltipAtTile

Tilemap-only — programmatic tooltip open on a tile.

```typescript
showTooltipAtTile(idOrCell: string | number | { x: number; y: number }): Promise<TilemapPointEventDetail | null>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `idOrCell` | `string \| number \| { x: number; y: number }` | 필수 |

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

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

<a id="method-hideTooltip"></a>

### hideTooltip

현재 표시 중인 툴팁을 닫습니다.

```typescript
hideTooltip(): Promise<void>
```

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

<a id="method-zoomTo"></a>

### zoomTo

Zoom to explicit windows of the drawing (`x` / `y` as `{ min, max }` or `[min, max]` over 0..1; `null` clears that orientation).

```typescript
zoomTo(request: CartesianZoomRequest): Promise<CartesianZoomChangeEventDetail | null>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `request` | `CartesianZoomRequest` | 필수 |

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

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

<a id="method-zoomBy"></a>

### zoomBy

Scale the current windows by `factor` (< 1 zooms in) around `anchorFraction` (0..1, default centre).

```typescript
zoomBy(factor: number, anchorFraction?: number): Promise<CartesianZoomChangeEventDetail | null>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `factor` | `number` | 필수 |
| `anchorFraction` | `number` | 선택 |

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

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

<a id="method-panBy"></a>

### panBy

Slide the zoomed windows by a fraction of the drawing (`{ x?, y? }`); a no-op at the full extent.

```typescript
panBy(delta: { x?: number; y?: number }): Promise<CartesianZoomChangeEventDetail | null>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `delta` | `{ x?: number; y?: number }` | 필수 |

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

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

<a id="method-resetZoom"></a>

### resetZoom

확대·이동한 범위를 초기 데이터 범위로 되돌립니다.

```typescript
resetZoom(): Promise<CartesianZoomChangeEventDetail | null>
```

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

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

<a id="method-getZoom"></a>

### getZoom

현재 확대 범위를 읽습니다. 반환 타입의 null 허용 여부와 축별 범위를 확인하세요.

```typescript
getZoom(): Promise<CartesianZoomState | null>
```

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

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

<a id="method-getZoomExtent"></a>

### getZoomExtent

The full extent of the drawing (0..1 on both orientations, the id-less slot key).

```typescript
getZoomExtent(request?: CartesianZoomExtentRequest): Promise<CartesianZoomExtentDetail | null>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `request` | `CartesianZoomExtentRequest` | 선택 |

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

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

<a id="method-getEngineStatus"></a>

### getEngineStatus

Requested engine vs what runs, and why (CHART-ADD-08): always Standard (this type has no WebGPU renderer); read without side effects, never consults the license.

```typescript
getEngineStatus(): Promise<ChartEngineStatus>
```

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

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