# Tilemap

Compare locations and values using equally sized tiles.

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

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

## sy-tilemap

Show administrative or logical regions in a normalized layout.

Tile coordinates do not represent actual geographic area or distance. Explain what the layout means.

Base chart tier: Community. Features such as additional renderers and custom branding have separate entitlement requirements.

| Input | Data description |
| --- | --- |
| `data` | An array of { x, y, value?, name?, label? }. |
| `tileShape` | The tile shape. |
| `colorAxis` | Continuous values can use an auto color axis. |

- [Run in Components](https://chart.syidax.com/charts/tilemap) — Change options and view framework-specific code
- [Shared installation and integration](https://chart.syidax.com/docs/getting-started.md)

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

## Complete implementation example

```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": "Zone 1",
            "label": "1",
            "value": 20
          },
          {
            "x": 1,
            "y": 0,
            "name": "Zone 2",
            "label": "2",
            "value": 33
          },
          {
            "x": 2,
            "y": 0,
            "name": "Zone 3",
            "label": "3",
            "value": 46
          },
          {
            "x": 3,
            "y": 0,
            "name": "Zone 4",
            "label": "4",
            "value": 59
          },
          {
            "x": 4,
            "y": 0,
            "name": "Zone 5",
            "label": "5",
            "value": 72
          },
          {
            "x": 0,
            "y": 1,
            "name": "Zone 6",
            "label": "6",
            "value": 85
          },
          {
            "x": 1,
            "y": 1,
            "name": "Zone 7",
            "label": "7",
            "value": 98
          },
          {
            "x": 2,
            "y": 1,
            "name": "Zone 8",
            "label": "8",
            "value": 31
          },
          {
            "x": 3,
            "y": 1,
            "name": "Zone 9",
            "label": "9",
            "value": 44
          },
          {
            "x": 4,
            "y": 1,
            "name": "Zone 10",
            "label": "10",
            "value": 57
          },
          {
            "x": 0,
            "y": 2,
            "name": "Zone 11",
            "label": "11",
            "value": 70
          },
          {
            "x": 1,
            "y": 2,
            "name": "Zone 12",
            "label": "12",
            "value": 83
          },
          {
            "x": 2,
            "y": 2,
            "name": "Zone 13",
            "label": "13",
            "value": 96
          },
          {
            "x": 3,
            "y": 2,
            "name": "Zone 14",
            "label": "14",
            "value": 29
          },
          {
            "x": 4,
            "y": 2,
            "name": "Zone 15",
            "label": "15",
            "value": 42
          },
          {
            "x": 0,
            "y": 3,
            "name": "Zone 16",
            "label": "16",
            "value": 55
          },
          {
            "x": 1,
            "y": 3,
            "name": "Zone 17",
            "label": "17",
            "value": 68
          },
          {
            "x": 2,
            "y": 3,
            "name": "Zone 18",
            "label": "18",
            "value": 81
          },
          {
            "x": 3,
            "y": 3,
            "name": "Zone 19",
            "label": "19",
            "value": 94
          },
          {
            "x": 4,
            "y": 3,
            "name": "Zone 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 example chart');
    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);

  // In an SPA, call this function when the view is disposed.
  function disposeChart() {
    observer.disconnect();
    chart.removeEventListener('pointClick', onEvent);
    container.replaceChildren();
  }
</script>
```

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

## Properties

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

### data

An array of { x, y, value?, name?, label? }.

| Item | Value |
| --- | --- |
| JavaScript property | `data` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `TilemapData` |
| Default | `[]` |

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

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

### width

Chart width in pixels. If the container width changes, update width from a ResizeObserver.

| Item | Value |
| --- | --- |
| JavaScript property | `width` |
| HTML attribute | `width` |
| Type | `number` |
| Default | `640` |

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

### height

Chart height in pixels. Allow space for axes, titles, and the legend.

| Item | Value |
| --- | --- |
| JavaScript property | `height` |
| HTML attribute | `height` |
| Type | `number` |
| Default | `420` |

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

### brandLogo

The default is the Syidax symbol and wordmark. With the Pro chart.branding entitlement, set none to remove it or provide a PNG, JPEG, or WebP data URL to replace it.

| Item | Value |
| --- | --- |
| JavaScript property | `brandLogo` |
| HTML attribute | `brand-logo` |
| Type | `string` |
| Default | `undefined` |

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

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

### brandPosition

The corner where the logo is anchored. Community and Pro both support all four corners, using the same position on screen and in image exports.

| Item | Value |
| --- | --- |
| JavaScript property | `brandPosition` |
| HTML attribute | `brand-position` |
| Type | `'top-left' \| 'top-right' \| 'bottom-left' \| 'bottom-right'` |
| Default | `'bottom-right'` |
| Allowed values | `top-left`, `top-right`, `bottom-left`, `bottom-right` |

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

### palette

Allowed values: tableau10, tableau20, observable10, paired12, set3_12. Default: 'tableau10'.

| Item | Value |
| --- | --- |
| JavaScript property | `palette` |
| HTML attribute | `palette` |
| Type | `TilemapPaletteName` |
| Default | `'tableau10'` |
| Allowed values | `tableau10`, `tableau20`, `observable10`, `paired12`, `set3_12` |

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

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

### colors

Pass as a JavaScript property. type: ReadonlyArray<string>.

| Item | Value |
| --- | --- |
| JavaScript property | `colors` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `ReadonlyArray<string>` |
| Default | `undefined` |

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

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

### tileShape

The tile shape.

| Item | Value |
| --- | --- |
| JavaScript property | `tileShape` |
| HTML attribute | `tile-shape` |
| Type | `TilemapTileShape` |
| Default | `'hexagon'` |
| Allowed values | `circle`, `square`, `diamond`, `hexagon` |

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

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

### gap

Empty px kept between tiles.

| Item | Value |
| --- | --- |
| JavaScript property | `gap` |
| HTML attribute | `gap` |
| Type | `number` |
| Default | `2` |

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

### showLabels

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

| Item | Value |
| --- | --- |
| JavaScript property | `showLabels` |
| HTML attribute | `show-labels` |
| Type | `boolean` |
| Default | `true` |

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

### colorAxis

Continuous values can use an auto color axis.

| Item | Value |
| --- | --- |
| JavaScript property | `colorAxis` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `TilemapColorAxisInput` |
| Default | `undefined` |
| Literals in the type | `auto` |

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

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

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

### colorLegend

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

| Item | Value |
| --- | --- |
| JavaScript property | `colorLegend` |
| HTML attribute | `color-legend` |
| Type | `boolean` |
| Default | `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.

| Item | Value |
| --- | --- |
| JavaScript property | `legendPosition` |
| HTML attribute | `legend-position` |
| Type | `TilemapLegendPosition` |
| Default | `'bottom'` |
| Allowed values | `top`, `bottom`, `left`, `right`, `float` |

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

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

### legendFloatAlign

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

| Item | Value |
| --- | --- |
| JavaScript property | `legendFloatAlign` |
| HTML attribute | `legend-float-align` |
| Type | `'start' \| 'center' \| 'end'` |
| Default | `'end'` |
| Allowed values | `start`, `center`, `end` |

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

### legendFloatVerticalAlign

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

| Item | Value |
| --- | --- |
| JavaScript property | `legendFloatVerticalAlign` |
| HTML attribute | `legend-float-vertical-align` |
| Type | `'top' \| 'middle' \| 'bottom'` |
| Default | `'top'` |
| Allowed values | `top`, `bottom`, `middle` |

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

### legendDraggable

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

| Item | Value |
| --- | --- |
| JavaScript property | `legendDraggable` |
| HTML attribute | `legend-draggable` |
| Type | `boolean` |
| Default | `false` |

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

### labelColor

Set as an HTML attribute or JavaScript property. type: string.

| Item | Value |
| --- | --- |
| JavaScript property | `labelColor` |
| HTML attribute | `label-color` |
| Type | `string` |
| Default | `'#ffffff'` |

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

### chartTitle

The title inside the chart. Explain the data's unit and meaning alongside it.

| Item | Value |
| --- | --- |
| JavaScript property | `chartTitle` |
| HTML attribute | `chart-title` |
| Type | `string` |
| Default | `undefined` |

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

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

### chartSubtitle

The subtitle inside the chart.

| Item | Value |
| --- | --- |
| JavaScript property | `chartSubtitle` |
| HTML attribute | `chart-subtitle` |
| Type | `string` |
| Default | `undefined` |

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

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

### tooltipShow

Whether to display the built-in tooltip.

| Item | Value |
| --- | --- |
| JavaScript property | `tooltipShow` |
| HTML attribute | `tooltip-show` |
| Type | `boolean` |
| Default | `true` |

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

### tooltipFormat

Pass as a JavaScript property. type: (tile: TilemapResolvedTile) => string.

| Item | Value |
| --- | --- |
| JavaScript property | `tooltipFormat` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `(tile: TilemapResolvedTile) => string` |
| Default | `undefined` |

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

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

<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.

| Item | Value |
| --- | --- |
| JavaScript property | `tooltip` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `TilemapTooltipInput` |
| Default | `undefined` |
| Literals in the type | `auto`, `off` |

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

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

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

### enableMouseTracking

Set as an HTML attribute or JavaScript property. type: boolean.

| Item | Value |
| --- | --- |
| JavaScript property | `enableMouseTracking` |
| HTML attribute | `enable-mouse-tracking` |
| Type | `boolean` |
| Default | `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).

| Item | Value |
| --- | --- |
| JavaScript property | `zoom` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `CartesianZoomInput` |
| Default | `undefined` |
| Literals in the type | `auto`, `off`, `true`, `false`, `x`, `y`, `xy`, `inside` |

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

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

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

### engine

Renderer selection: auto, standard, or pro. Engine selection is separate from permission to use a Pro chart type.

| Item | Value |
| --- | --- |
| JavaScript property | `engine` |
| HTML attribute | `engine` |
| Type | `TilemapEngineMode` |
| Default | `'auto'` |
| Allowed values | `auto`, `standard`, `pro` |

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

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

### unavailable

Allowed values: fallback, error, throw. Default: 'fallback'.

| Item | Value |
| --- | --- |
| JavaScript property | `unavailable` |
| HTML attribute | `unavailable` |
| Type | `TilemapUnavailableBehaviour` |
| Default | `'fallback'` |
| Allowed values | `fallback`, `error`, `throw` |

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

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

### streamSource

A stream source for live data. Check the contract for the specific type.

| Item | Value |
| --- | --- |
| JavaScript property | `streamSource` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `TilemapStreamSource` |
| Default | `undefined` |

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

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

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

### streamWindow

The streaming data range to keep visible.

| Item | Value |
| --- | --- |
| JavaScript property | `streamWindow` |
| HTML attribute | `stream-window` |
| Type | `number` |
| Default | `undefined` |

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

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

### streamMax

The maximum number of streaming data points to retain.

| Item | Value |
| --- | --- |
| JavaScript property | `streamMax` |
| HTML attribute | `stream-max` |
| Type | `number` |
| Default | `undefined` |

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

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

### animated

Whether to animate initial display and data changes.

| Item | Value |
| --- | --- |
| JavaScript property | `animated` |
| HTML attribute | `animate` |
| Type | `boolean` |
| Default | `false` |

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

### animationDuration

Animation duration in milliseconds.

| Item | Value |
| --- | --- |
| JavaScript property | `animationDuration` |
| HTML attribute | `animation-duration` |
| Type | `number` |
| Default | `600` |

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

### animationEasing

Allowed values: linear, ease-out, ease-in, ease-in-out. Default: 'ease-out'.

| Item | Value |
| --- | --- |
| JavaScript property | `animationEasing` |
| HTML attribute | `animation-easing` |
| Type | `TilemapEasing` |
| Default | `'ease-out'` |
| Allowed values | `linear`, `ease-out`, `ease-in`, `ease-in-out` |

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

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

### animationType

Allowed values: initial, update. Default: undefined.

| Item | Value |
| --- | --- |
| JavaScript property | `animationType` |
| HTML attribute | `animation-type` |
| Type | `TilemapAnimationType` |
| Default | `undefined` |
| Allowed values | `initial`, `update` |

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

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

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

## Events

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

### rendered

Emits rendering results in detail when chart drawing completes.

Event name: `rendered`. Names are case-sensitive. Read the payload from `detail` on `CustomEvent<TilemapRenderResult & { tier: TilemapEngineTier }>`.

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

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

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

### pointClick

A point selection event. Read the selected data and index from CustomEvent.detail.

Event name: `pointClick`. Names are case-sensitive. Read the payload from `detail` on `CustomEvent<TilemapPointEventDetail>`.

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

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

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

### pointHover

CustomEvent.detail type: TilemapPointEventDetail | null. Event names are case-sensitive.

Event name: `pointHover`. Names are case-sensitive. Read the payload from `detail` on `CustomEvent<TilemapPointEventDetail | null>`.

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

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

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

### pointContextMenu

CustomEvent.detail type: ChartPointContextMenuEventDetail<TilemapPointEventDetail>. Event names are case-sensitive.

Event name: `pointContextMenu`. Names are case-sensitive. Read the payload from `detail` on `CustomEvent<ChartPointContextMenuEventDetail<TilemapPointEventDetail>>`.

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

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

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

### appended

CustomEvent.detail type: { count: number }. Event names are case-sensitive.

Event name: `appended`. Names are case-sensitive. Read the payload from `detail` on `CustomEvent<{ count: number }>`.

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

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

### windowSlid

CustomEvent.detail type: { dropped: number }. Event names are case-sensitive.

Event name: `windowSlid`. Names are case-sensitive. Read the payload from `detail` on `CustomEvent<{ dropped: number }>`.

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

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

### chartAnimationStart

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: `chartAnimationStart`. Names are case-sensitive. Read the payload from `detail` on `CustomEvent<void>`.

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

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

### chartAnimationEnd

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: `chartAnimationEnd`. Names are case-sensitive. Read the payload from `detail` on `CustomEvent<void>`.

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

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

### chartAnimationInterrupted

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: `chartAnimationInterrupted`. Names are case-sensitive. Read the payload from `detail` on `CustomEvent<void>`.

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

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

### tooltipShow

Whether to display the built-in tooltip.

Event name: `tooltipShow`. Names are case-sensitive. Read the payload from `detail` on `CustomEvent<TilemapTooltipShowEventDetail>`.

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

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

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

### tooltipHide

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: `tooltipHide`. Names are case-sensitive. Read the payload from `detail` on `CustomEvent<void>`.

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

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

### tooltipAction

CustomEvent.detail type: TilemapTooltipActionEventDetail. Event names are case-sensitive.

Event name: `tooltipAction`. Names are case-sensitive. Read the payload from `detail` on `CustomEvent<TilemapTooltipActionEventDetail>`.

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

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

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

### zoomChange

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

Event name: `zoomChange`. Names are case-sensitive. Read the payload from `detail` on `CustomEvent<CartesianZoomChangeEventDetail>`.

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

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

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

## Methods

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

### redraw

Redraw the chart using its current data and options. Inspect the rendered result after the returned Promise resolves.

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

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

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

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

### getActiveTier

An asynchronous method. Check the argument and return types below.

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

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

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

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

### addTile

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

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

| Arguments | Type | Required |
| --- | --- | --- |
| `datum` | `TilemapDatum` | Required |

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

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

<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>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `idOrCell` | `string \| number \| { x: number; y: number }` | Required |

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

<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>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `idOrCell` | `string \| number \| { x: number; y: number }` | Required |
| `patch` | `Partial<TilemapDatum>` | Required |

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

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

<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>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `idOrCell` | `string \| number \| { x: number; y: number }` | Required |
| `value` | `number` | Required |

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

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

### appendPoint

Append one value to the stream. Check the argument type and the licensing requirements for streaming.

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

| Arguments | Type | Required |
| --- | --- | --- |
| `datum` | `TilemapDatum` | Required |

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

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

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

### appendBatch

Append multiple values to the stream. Check the argument type and the licensing requirements for streaming.

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

| Arguments | Type | Required |
| --- | --- | --- |
| `datums` | `ReadonlyArray<TilemapDatum>` | Required |

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

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

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

### shift

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

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

| Arguments | Type | Required |
| --- | --- | --- |
| `count` | `number` | Optional |

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

<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>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `datums` | `ReadonlyArray<TilemapDatum>` | Required |

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

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

<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>
```

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

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

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

### setAnimation

An asynchronous method. Check the argument and return types below.

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

| Arguments | Type | Required |
| --- | --- | --- |
| `options` | `{ duration?: number; easing?: TilemapEasing; enabled?: boolean; type?: TilemapAnimationType }` | Required |

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

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

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

### pauseAnimation

Pause the current animation.

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

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

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

### resumeAnimation

Resume a paused animation.

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

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

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

### replayAnimation

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

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

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

<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>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `cssX` | `number` | Required |
| `cssY` | `number` | Required |

Return type: `Promise<{ index: number; id: string; col: number; row: number; name: string } | null>`. Call the method after element registration and await its Promise result.

<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>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `idOrCell` | `string \| number \| { x: number; y: number }` | Required |

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

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

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

### hideTooltip

Close the currently visible tooltip.

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

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

<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>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `request` | `CartesianZoomRequest` | Required |

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

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

<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>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `factor` | `number` | Required |
| `anchorFraction` | `number` | Optional |

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

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

<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>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `delta` | `{ x?: number; y?: number }` | Required |

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

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

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

### resetZoom

Reset the zoomed or panned range to the original data range.

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

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

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

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

### getZoom

Read the current zoom range. Check the return type's nullability and the range for each axis.

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

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

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

<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>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `request` | `CartesianZoomExtentRequest` | Optional |

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

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

<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>
```

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

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