# Area

Show trends and magnitude with filled areas.

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

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

## sy-area-chart

Use for traffic, revenue, and other measures whose magnitude changes over time.

Overlapping areas may hide series behind them. Provide tooltips and a data table for precise comparisons.

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

| Input | Data description |
| --- | --- |
| `series` | Each series contains values in chronological order. |
| `xAxis` | Provide categories with the same length as the series. |
| `yAxis` | The value axis that defines the area's baseline. |

- [Run in Components](https://chart.syidax.com/charts/area) — 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-area-chart.js';
  define0();

  const specs = [
    {
      "id": "example-chart",
      "tag": "sy-area-chart",
      "props": {
        "engine": "standard",
        "series": [
          {
            "name": "Online",
            "values": [24, 29, 27, 38, 43, 40],
            "color": "#8263d9"
          },
          {
            "name": "Store",
            "values": [15, 19, 17, 24, 22, 29],
            "color": "#239c91"
          }
        ],
        "xAxis": {
          "kind": "category",
          "categories": ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
        },
        "yAxis": {
          "kind": "linear",
          "min": 0
        },
        "legend": true,
        "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', 'area 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-series"></a>

### series

Each series contains values in chronological order.

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

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

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

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

### activeSeriesIndex

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

| Item | Value |
| --- | --- |
| JavaScript property | `activeSeriesIndex` |
| HTML attribute | `active-series-index` |
| 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-seriesState"></a>

### seriesState

Pass as a JavaScript property. type: AreaChartSeriesStateOptions.

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

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

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

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

### seriesActiveTrigger

Allowed values: hover, click, custom. Default: 'hover'.

| Item | Value |
| --- | --- |
| JavaScript property | `seriesActiveTrigger` |
| HTML attribute | `series-active-trigger` |
| Type | `AreaChartSeriesActiveTrigger` |
| Default | `'hover'` |
| Allowed values | `hover`, `click`, `custom` |

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

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

### values

Values for a single series. Use the data type required by the selected chart, such as a number array for Line or coordinate array for Scatter. Assign arrays and objects as JavaScript properties.

| Item | Value |
| --- | --- |
| JavaScript property | `values` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `AreaChartValues` |
| Default | `new Float32Array(0)` |

- [AreaChartValues](https://chart.syidax.com/docs/types/AreaChartValues.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 | `600` |

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

<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-color"></a>

### color

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

| Item | Value |
| --- | --- |
| JavaScript property | `color` |
| HTML attribute | `color` |
| Type | `string` |
| Default | `'#2563eb'` |

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

### fillColor

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

| Item | Value |
| --- | --- |
| JavaScript property | `fillColor` |
| HTML attribute | `fill-color` |
| 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-fillOpacity"></a>

### fillOpacity

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

| Item | Value |
| --- | --- |
| JavaScript property | `fillOpacity` |
| HTML attribute | `fill-opacity` |
| 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-fillGradient"></a>

### fillGradient

Pass as a JavaScript property. type: AreaChartFillGradient.

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

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

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

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

### fillPattern

Pass as a JavaScript property. type: AreaChartFillPattern.

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

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

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

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

### patternKind

Allowed values: dots, diagonal, cross-hatch, diagonal-forward, diagonal-backward, fill. Default: undefined.

| Item | Value |
| --- | --- |
| JavaScript property | `patternKind` |
| HTML attribute | `pattern-kind` |
| Type | `AreaChartPatternKind` |
| Default | `undefined` |
| Allowed values | `dots`, `diagonal`, `cross-hatch`, `diagonal-forward`, `diagonal-backward`, `fill` |

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

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

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

### patternColor

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

| Item | Value |
| --- | --- |
| JavaScript property | `patternColor` |
| HTML attribute | `pattern-color` |
| 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-patternBackground"></a>

### patternBackground

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

| Item | Value |
| --- | --- |
| JavaScript property | `patternBackground` |
| HTML attribute | `pattern-background` |
| 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-patternSize"></a>

### patternSize

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

| Item | Value |
| --- | --- |
| JavaScript property | `patternSize` |
| HTML attribute | `pattern-size` |
| 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-patternThickness"></a>

### patternThickness

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

| Item | Value |
| --- | --- |
| JavaScript property | `patternThickness` |
| HTML attribute | `pattern-thickness` |
| 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-thickness"></a>

### thickness

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

| Item | Value |
| --- | --- |
| JavaScript property | `thickness` |
| HTML attribute | `thickness` |
| Type | `number` |
| Default | `1` |

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

### marker

Allowed values: none, circle, square, triangle, cross, diamond, star. Default: 'none'.

| Item | Value |
| --- | --- |
| JavaScript property | `marker` |
| HTML attribute | `marker` |
| Type | `LineChartMarker` |
| Default | `'none'` |
| Allowed values | `none`, `circle`, `square`, `triangle`, `cross`, `diamond`, `star` |

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

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

### markerSize

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

| Item | Value |
| --- | --- |
| JavaScript property | `markerSize` |
| HTML attribute | `marker-size` |
| Type | `number` |
| Default | `4` |

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

### markerFilter

Pass as a JavaScript property. type: LineChartMarkerFilter.

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

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

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

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

### baseline

Value the area is anchored to (line at `yScale(baseline)`). Always explicit (default `0`) so the rendered start point is never ambiguous.

| Item | Value |
| --- | --- |
| JavaScript property | `baseline` |
| HTML attribute | `baseline` |
| Type | `number` |
| Default | `0` |

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

### connectNulls

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

| Item | Value |
| --- | --- |
| JavaScript property | `connectNulls` |
| HTML attribute | `connect-nulls` |
| Type | `boolean` |
| Default | `false` |

<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 | `AreaChartEngineMode` |
| Default | `'auto'` |
| Allowed values | `auto`, `standard`, `pro` |

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

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

### proThreshold

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

| Item | Value |
| --- | --- |
| JavaScript property | `proThreshold` |
| HTML attribute | `pro-threshold` |
| Type | `number` |
| Default | `100_000` |

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

### unavailable

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

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

- [AreaChartUnavailableBehaviour](https://chart.syidax.com/docs/types/AreaChartUnavailableBehaviour.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 | `AreaChartStreamSource` |
| Default | `undefined` |

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

- [AreaChartStreamSource](https://chart.syidax.com/docs/types/AreaChartStreamSource.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 | `200` |

<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 | `AreaChartEasing` |
| Default | `'ease-out'` |
| Allowed values | `linear`, `ease-out`, `ease-in`, `ease-in-out` |

- [AreaChartEasing](https://chart.syidax.com/docs/types/AreaChartEasing.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 | `AreaChartAnimationType` |
| 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.

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

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

### legend

Whether to show a legend for series or items.

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

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

### legendPosition

Where the legend is positioned.

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

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

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

### legendItems

Pass as a JavaScript property. type: LegendItem[].

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

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

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

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

### seriesName

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

| Item | Value |
| --- | --- |
| JavaScript property | `seriesName` |
| HTML attribute | `series-name` |
| 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-legendFloatAlign"></a>

### legendFloatAlign

Allowed values: start, center, end. Default: 'end'.

| 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

Allowed values: top, bottom, middle. Default: 'top'.

| 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

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

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

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

### xAxis

Provide categories with the same length as the series.

| Item | Value |
| --- | --- |
| JavaScript property | `xAxis` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `CartesianAxisInput \| ReadonlyArray<CartesianAxisInput>` |
| 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.

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

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

### yAxis

The value axis that defines the area's baseline.

| Item | Value |
| --- | --- |
| JavaScript property | `yAxis` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `CartesianYAxisInput` |
| 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.

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

<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-tooltip"></a>

### tooltip

Tooltip settings for pointer-driven values, position, and content.

| Item | Value |
| --- | --- |
| JavaScript property | `tooltip` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `CartesianTooltipInput` |
| 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.

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

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

### crosshair

Pass as a JavaScript property. type: CartesianCrosshairInput.

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

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

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

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

### gridLines

Allowed values: auto, off. Default: undefined.

| Item | Value |
| --- | --- |
| JavaScript property | `gridLines` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `CartesianGridLinesInput` |
| 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.

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

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

### zoom

zoom: `'x'` | `'y'` | `'xy'` | `true` (x) enable the drag rectangle + keyboard (`+` / `-` / `Escape`) on the primary axes; an object refines `mode` / `drag` / `keyboard` / `minRangePx` / `resetButton`. Off by default. `zoomTo` / `zoomBy` / `resetZoom` work regardless of the gesture switches.

| 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-brush"></a>

### brush

brush selection: 'rect' | true | { type, mode, modifier, minSizePx, keyboard, clearOnClick }; off by default.

| Item | Value |
| --- | --- |
| JavaScript property | `brush` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `CartesianBrushInput` |
| Default | `undefined` |
| Literals in the type | `auto`, `off`, `true`, `false`, `rect`, `lasso` |

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

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

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

### drawings

the drawing document: a list of drawings, a serialized envelope, or a JSON string of either (replaces the document; the history restarts).

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

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

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

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

### drawingMode

the pointer disposition: 'none' (default), 'draw' (the plain drag places `drawingTool`; precedence drawing > brush > zoom > pan), 'select' ().

| Item | Value |
| --- | --- |
| JavaScript property | `drawingMode` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `DrawingModeInput` |
| Default | `undefined` |
| Literals in the type | `none`, `off`, `true`, `false`, `draw`, `select` |

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

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

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

### drawingTool

the tool `drawingMode="draw"` places (a registered tool name; default 'segment').

| Item | Value |
| --- | --- |
| JavaScript property | `drawingTool` |
| HTML attribute | `drawing-tool` |
| 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-drawingSpace"></a>

### drawingSpace

the space new drawings are anchored in: 'data' (default — the primary axes) or 'pixel' (offsets from the plot's top-left; they stay put under zoom, pan and data changes).

| Item | Value |
| --- | --- |
| JavaScript property | `drawingSpace` |
| HTML attribute | `drawing-space` |
| Type | `DrawingSpace` |
| Default | `undefined` |
| Allowed values | `data`, `pixel` |

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

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

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

### visualMap

a visual map binding (a `sy-visual-map` snapshot + the data dimension): every mark is coloured through it.

| Item | Value |
| --- | --- |
| JavaScript property | `visualMap` |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | `VisualMapBinding \| null` |
| Default | `undefined` |

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

- [VisualMapBinding](https://chart.syidax.com/docs/types/VisualMapBinding.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<AreaChartRenderResult & { tier: AreaChartEngineTier }>`.

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

- [AreaChartRenderResult](https://chart.syidax.com/docs/types/AreaChartRenderResult.md) — Type definition
- [AreaChartEngineTier](https://chart.syidax.com/docs/types/AreaChartEngineTier.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-crosshairMove"></a>

### crosshairMove

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

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

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

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

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

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

- [CartesianTooltipEventDetail](https://chart.syidax.com/docs/types/CartesianTooltipEventDetail.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: CartesianTooltipActionEventDetail. Event names are case-sensitive.

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

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

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

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

### zoomChange

fired after every zoom change (drag / keyboard / api / reset) with the new state.

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="event-brushChange"></a>

### brushChange

the brush areas / selection changed (drag, api, clear, keyboard).

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

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

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

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

### brushStart

a brush drag opened up (once per gesture).

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

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

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

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

### brushMove

a live frame of the drag (throttled; the selection only with `liveSelection`).

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

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

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

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

### brushEnd

the drag released (after `brushChange`), or was cancelled.

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

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

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

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

### drawingsChange

the drawing document changed (a placement, the api, undo / redo, clear, the prop).

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

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

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

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

### drawingSelectionChange

the drawing selection changed (a click, a marquee, the api, Escape, a document change pruning it).

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

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

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

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

### pointHover

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

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

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

- [CartesianPointEventDetail](https://chart.syidax.com/docs/types/CartesianPointEventDetail.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<CartesianPointEventDetail>`.

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

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

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

### pointContextMenu

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

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

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

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

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

### seriesOutsideClick

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

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

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

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

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

### legendItemClick

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

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

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

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

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

### seriesToggled

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

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

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

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

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

## Methods

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

### appendPoint

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

```typescript
appendPoint(value: number): Promise<void>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `value` | `number` | Required |

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

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

### appendBatch

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

```typescript
appendBatch(values: ReadonlyArray<number> | Float32Array): Promise<void>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `values` | `ReadonlyArray<number> \| Float32Array` | Required |

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

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

### shift

Drop the oldest streamed categories (the `data` boxes are not the stream).

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

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

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(values: ReadonlyArray<number> | Float32Array): Promise<void>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `values` | `ReadonlyArray<number> \| Float32Array` | Required |

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

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

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

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

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

### getEngineStatus

The requested engine, the engine that draws and why . A Chart Pro license decision names `chart.webgpu` and its state; renderer causes (not in this build, no WebGPU, a failed GPU) stay apart.

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

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

### setAnimation

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

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

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

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

- [AreaChartEasing](https://chart.syidax.com/docs/types/AreaChartEasing.md) — Type definition
- [AreaChartAnimationType](https://chart.syidax.com/docs/types/AreaChartAnimationType.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-showTooltipAtPoint"></a>

### showTooltipAtPoint

Open the tooltip for a dot programmatically. `pointIndex` is the category (row) index; the optional `seriesIndex` selects a group within that row (defaults to the first visible group's dot in the row). Returns the emitted tooltip detail, or null when no dot resolves / the tooltip is disabled.

```typescript
showTooltipAtPoint(pointIndex: number): Promise<CartesianTooltipEventDetail | null>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `pointIndex` | `number` | Required |

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

- [CartesianTooltipEventDetail](https://chart.syidax.com/docs/types/CartesianTooltipEventDetail.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: `x` / `y` as `{ min, max }` or `[min, max]` (`null` clears that orientation); `xAxis` / `yAxis` name the axis by id or slot index (default: the primary axis).

```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 data units (`{ 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 (and key) of the primary — or the named — master axes (`null` before the first layout).

```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-showCrosshairAt"></a>

### showCrosshairAt

show the crosshair at a data position (a linked chart's cursor) without emitting `crosshairMove`; false when it falls outside the plot.

```typescript
showCrosshairAt(request: CartesianCrosshairShowRequest): Promise<boolean>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `request` | `CartesianCrosshairShowRequest` | Required |

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

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

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

### hideCrosshair

hide the crosshair shown by `showCrosshairAt` (or the pointer's).

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

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

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

### getDrawings

the drawings of the document (data-space anchors).

```typescript
getDrawings(): Promise<ChartDrawing[]>
```

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

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

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

### setDrawings

replace the document from script (`null` clears); the history keeps the previous document as an undo step.

```typescript
setDrawings(drawings: ReadonlyArray<ChartDrawingInput> | null): Promise<DrawingsChangeEventDetail | null>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `drawings` | `ReadonlyArray<ChartDrawingInput> \| null` | Required |

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

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

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

### addDrawing

add one drawing (an explicit id replaces); answers the resolved drawing, or null when the input was malformed.

```typescript
addDrawing(drawing: ChartDrawingInput): Promise<ChartDrawing | null>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `drawing` | `ChartDrawingInput` | Required |

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

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

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

### updateDrawing

merge a patch into one drawing (anchors, style, visible, locked, options, meta).

```typescript
updateDrawing(id: string, patch: Partial<Omit<ChartDrawing, 'id'>>): Promise<ChartDrawing | null>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `id` | `string` | Required |
| `patch` | `Partial<Omit<ChartDrawing, 'id'>>` | Required |

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

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

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

### removeDrawing

remove one drawing.

```typescript
removeDrawing(id: string): Promise<boolean>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `id` | `string` | Required |

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

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

### removeDrawings

remove several drawings in one undoable step (locked / unknown ids are skipped); the selection prunes itself.

```typescript
removeDrawings(ids: ReadonlyArray<string>): Promise<DrawingsChangeEventDetail | null>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `ids` | `ReadonlyArray<string>` | Required |

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

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

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

### setDrawingSpace

move a drawing to the other coordinate space at the current frame (its anchors convert, nothing moves on screen); one undoable step.

```typescript
setDrawingSpace(id: string, space: DrawingSpace): Promise<ChartDrawing | null>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `id` | `string` | Required |
| `space` | `DrawingSpace` | Required |

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

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

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

### clearDrawings

clear the document (undoable).

```typescript
clearDrawings(): Promise<DrawingsChangeEventDetail | null>
```

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

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

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

### undoDrawing

undo the last document change; null when there is nothing to undo.

```typescript
undoDrawing(): Promise<DrawingsChangeEventDetail | null>
```

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

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

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

### redoDrawing

redo the last undone change; null when there is nothing to redo.

```typescript
redoDrawing(): Promise<DrawingsChangeEventDetail | null>
```

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

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

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

### getDrawingLayer

the drawing overlay as a standalone SVG layer in host pixels (selection chrome and the placement preview stripped; null without drawings) — what the facade composes into the image export.

```typescript
getDrawingLayer(): Promise<DrawingLayerSnapshot | null>
```

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

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

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

### exportDrawings

the document as its versioned JSON envelope (feed it back through `drawings` or `importDrawings`).

```typescript
exportDrawings(): Promise<string>
```

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

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

### importDrawings

replace the document from an envelope / list / JSON string (undoable; malformed rows drop).

```typescript
importDrawings(input: ChartDrawingsInput): Promise<DrawingsChangeEventDetail | null>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `input` | `ChartDrawingsInput` | Required |

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

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

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

### selectDrawings

select drawings from script (`null` / `[]` clears); unknown ids are dropped.

```typescript
selectDrawings(ids: ReadonlyArray<string> | null): Promise<DrawingSelectionChangeEventDetail | null>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `ids` | `ReadonlyArray<string> \| null` | Required |

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

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

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

### getDrawingSelection

the selected drawing ids.

```typescript
getDrawingSelection(): Promise<string[]>
```

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

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

### setBrush

replace the brush areas from script (`null` clears); `brushChange` fires with source 'api'.

```typescript
setBrush(areas: ReadonlyArray<CartesianBrushAreaInput> | null): Promise<CartesianBrushChangeEventDetail | null>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `areas` | `ReadonlyArray<CartesianBrushAreaInput> \| null` | Required |

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

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

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

### clearBrush

clear the brush areas (`brushChange` with source 'clear').

```typescript
clearBrush(): Promise<CartesianBrushChangeEventDetail | null>
```

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

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

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

### getBrush

the persisted brush areas (primary data space).

```typescript
getBrush(): Promise<CartesianBrushArea[]>
```

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

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

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

### getBrushSelection

the points inside the brush areas, against the current layout.

```typescript
getBrushSelection(): Promise<CartesianBrushSelectedSeries[]>
```

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

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

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

### setVisualMap

Bind (or clear) a visual map: every mark is coloured through it on the next paint.

```typescript
setVisualMap(binding: VisualMapBinding | null): Promise<VisualMapBinding | null>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `binding` | `VisualMapBinding \| null` | Required |

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

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

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

### getVisualMap

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

```typescript
getVisualMap(): Promise<VisualMapBinding | null>
```

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

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

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

### getVisualExtent

The extent of a dimension over the visible points — what a bound `sy-visual-map` adopts as its domain.

```typescript
getVisualExtent(request?: VisualMapExtentRequest): Promise<VisualMapExtent | null>
```

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

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

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

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

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

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

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

### getActiveTier

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

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

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

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

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

### addSeries

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

```typescript
addSeries(options: AreaChartSeries, opts?: { redraw?: boolean; insertAt?: number }): Promise<number>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `options` | `AreaChartSeries` | Required |
| `opts` | `{ redraw?: boolean; insertAt?: number }` | Optional |

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

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

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

### removeSeries

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

```typescript
removeSeries(idOrIndex: string | number, opts?: { redraw?: boolean }): Promise<boolean>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `idOrIndex` | `string \| number` | Required |
| `opts` | `{ redraw?: boolean }` | Optional |

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

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

### updateSeries

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

```typescript
updateSeries(idOrIndex: string | number, patch: Partial<AreaChartSeries>, opts?: { redraw?: boolean }): Promise<boolean>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `idOrIndex` | `string \| number` | Required |
| `patch` | `Partial<AreaChartSeries>` | Required |
| `opts` | `{ redraw?: boolean }` | Optional |

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

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

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

### setSeriesData

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

```typescript
setSeriesData(idOrIndex: string | number, data: AreaChartValues, opts?: { redraw?: boolean }): Promise<boolean>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `idOrIndex` | `string \| number` | Required |
| `data` | `AreaChartValues` | Required |
| `opts` | `{ redraw?: boolean }` | Optional |

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

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

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

### addPoint

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

```typescript
addPoint(idOrIndex: string | number, point: number, opts?: { shift?: boolean; redraw?: boolean }): Promise<boolean>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `idOrIndex` | `string \| number` | Required |
| `point` | `number` | Required |
| `opts` | `{ shift?: boolean; redraw?: boolean }` | Optional |

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

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

### showSeries

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

```typescript
showSeries(idOrIndex: string | number, opts?: { redraw?: boolean }): Promise<boolean>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `idOrIndex` | `string \| number` | Required |
| `opts` | `{ redraw?: boolean }` | Optional |

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

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

### hideSeries

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

```typescript
hideSeries(idOrIndex: string | number, opts?: { redraw?: boolean }): Promise<boolean>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `idOrIndex` | `string \| number` | Required |
| `opts` | `{ redraw?: boolean }` | Optional |

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