# dispatchAction

One entry point over the imperative surface (ECharts `dispatchAction`): `{ type, payload }` or `{ type, ...fields }`. Routes to the method behind the type and answers `{ type, handled, result }`; an unknown type is reported, not thrown.

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

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

## Definition

```typescript
dispatchAction(action: ChartAction | string): Promise<ChartActionResult>
```

| Arguments | Type | Required |
| --- | --- | --- |
| `action` | `ChartAction \| string` | Required |

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

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

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

## Related charts


