# selectSlice

Pie-only — select a slice by id or index.

Canonical: https://chart.syidax.com/ko/docs/methods/selectSlice/

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

## 정의

```typescript
selectSlice(idOrIndex: string | number, selected?: boolean): Promise<boolean>
```

| 인수 | 타입 | 필수 여부 |
| --- | --- | --- |
| `idOrIndex` | `string \| number` | 필수 |
| `selected` | `boolean` | 선택 |

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

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

## 관련 차트

- [sy-pie-chart](https://chart.syidax.com/ko/docs/components/pie.md#method-selectSlice)
