# setSeriesData

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

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

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

## Definition

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

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

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

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

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

## Related charts

- [sy-line-chart](https://chart.syidax.com/docs/components/line.md#method-setSeriesData)
- [sy-area-chart](https://chart.syidax.com/docs/components/area.md#method-setSeriesData)
- [sy-column-chart](https://chart.syidax.com/docs/components/column.md#method-setSeriesData)
- [sy-bar-chart](https://chart.syidax.com/docs/components/bar.md#method-setSeriesData)
- [sy-scatter-chart](https://chart.syidax.com/docs/components/scatter.md#method-setSeriesData)
- [sy-marimekko-chart](https://chart.syidax.com/docs/components/marimekko.md#method-setSeriesData)
