# Start-To-End Count
Widget type: `opendash-widget-miaas-dependency` · Plugin: `@opendash/plugin-mobility`

## Description
Aggregates counts of start-to-end relations between areas or points. Use to analyse movement flows and origin-destination patterns. The widget walks through the historical geo positions of the selected data dimension in order, determines which configured area each position falls into, and counts the transitions from one area to the next. The result is rendered as a Highcharts dependency wheel, with a side panel that lets you filter which source areas are included.
## Data requirements
- Data selection: by dimension (`select: "dimension"`), exactly 1 item (min 1, max 1). Allowed value type: `Geo`.
- Data fetching: history only and required (`history: true`, `historyRequired: true`). The widget needs a historical sequence of positions to compute transitions.
## Options
| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `type` | `"json" \| "dimension" \| "zones"` | `"zones"` | How the areas are sourced. Selected in the settings panel via the geography selector. |
| `districtsFromZones` | `string[]` | `—` | IDs of predefined zones used as areas (when `type` is `zones`). Source: From Zones — "Choose a selection of zones from the predefined set of zones". |
| `districtFromDimension` | `DataItemDimensionIdentifier[]` | `—` | A geo data dimension whose value defines the areas (when `type` is `dimension`). Source: From Datasource — "Choose an geo data source, the value of which will be used as area". |
| `districts` | GeoJSON | `—` | A raw GeoJSON / ESRI shape definition (when `type` is `json`). Source: External Source — "Please specify a valid GeoJSON or ESRI shape string (JSON)". |
| `filter` | `Record<string, boolean>` | `{}` | Per-area inclusion flags for the dependency wheel. Managed at runtime through the side panel (select all, invert, or toggle individual areas) rather than in the settings panel. |
## Presets
- Start-To-End Count — Aggregates counts of start-to-end relations between areas or points. Use to analyse movement flows and origin-destination patterns. Tags: `map`. Default config: `filter: {}`.
## How to use
1. Add the "Start-To-End Count" widget to a dashboard.
2. Select exactly one geo data dimension that provides the position history.
3. In the settings panel, define the areas via the geography selector: From Zones, From Datasource (a geo dimension), or External Source (GeoJSON). Positions that fall outside all areas are grouped as "other".
4. Pick a history range; the dependency wheel shows the counted transitions between areas.
5. Open the side panel to filter which source areas are shown (toggle, select all, or invert the selection).