# Data based interval selection
Widget type: `opendash-widget-od-timecontrol` · Plugin: `@opendash/plugin-monitoring`

## Description
Allows selection of time intervals for the entire dashboard based on sensor values. The widget analyses the history of the selected data dimension(s), splits it into intervals wherever a value changes, and renders each interval as a clickable card. Clicking an interval overrides the dashboard's global time range (start/end), so all other widgets re-fetch and display data for exactly that period. Intervals are numbered and paginated, and the legend shows the configured data series with their colors.
## Data requirements
- `dataItems`: select by `dimension`, minimum 1 dimension (no maximum). Allowed value types: `Boolean`, `Number`, `String`, `Object`, `Geo`.
- `dataFetching`: history only (`live: false`, `history: true`).
The widget builds its intervals from the historical values of the selected dimensions, detecting changes across them to determine interval boundaries.
## Options
| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `title` (Choose title) | `string` | `""` | Optional heading shown above the intervals. When set, it is rendered in a divider together with the icon. |
| `icon` (Choose icon) | `string` | `""` | Optional icon shown next to the title (chosen with the icon picker). |
## Presets
- **Data based interval selection** — Allows selection of time intervals for the entire dashboard based on sensor values. Tagged `control`. No additional default config.
## How to use
1. Add the "Data based interval selection" widget to a dashboard.
2. Select one or more data dimensions whose value changes should define the intervals (for example a machine state or mode signal).
3. Optionally set a **title** and an **icon** in the settings to label the control.
4. On the dashboard, click any numbered interval card. The dashboard's global time range is set to that interval's start and end, and the other widgets update to show data for that period.
5. Use the simple pagination control to move between interval pages when there are many intervals.