---
id: "packages/active-charts/all-exports/period-selector"
title: "PeriodSelector"
description: "PeriodSelector, PeriodSelectorProps: generated from the source of active-charts."
url: "/packages/active-charts/all-exports/period-selector"
locale: "en"
revision: "g0mvjxwj5c-88bdbe1c:period-selector"
---

# PeriodSelector

Exported by `@workspace/active-charts`. Generated from the package source; part of [the index of every export](/packages/active-charts/all-exports).

## `PeriodSelector`

| Prop | Type | Required | Description |
| --- | --- | --- | --- |
| `children` | `(filteredData: ChartDatum[]) => ReactNode` | yes | Render function receiving the filtered data. |
| `data` | `ChartDatum[]` | yes | Full dataset. |
| `dateKey` | `string` | yes | Key for the date field in the data. |
| `defaultPeriod` | `Period` | no | Default period. Default: 'MAX'. |
| `t` | `ChartTranslateFn` | no | The host translator for the period labels. When omitted, `<ChartDefaults>` supplies it; with neither, the selector throws a configuration error (no English fallback, ADR-028). |

## Types

**PeriodSelectorProps**

```ts
interface PeriodSelectorProps {
  data: ChartDatum[];
  dateKey: string;
  defaultPeriod?: Period;
  t?: ChartTranslateFn;
  children: (filteredData: ChartDatum[]) => ReactNode;
}
```
