# Area Values with Daily Statistics Widget type: `opendash-widget-leaflet-district-values` · Plugin: `@opendash/plugin-mobility` ![Area Values with Daily Statistics preview](../../../../../_attachments/opendash/widgets/assets/widget-previews/leaflet-district-values.png) ## Description Shows current values and daily min/max statistics for defined areas on a map. Use to compare area-level metrics and their daily ranges. Each configured geographic area (district) is matched in order to one of the selected numeric data points (1st GeoJSON feature → 1st data point, 2nd → 2nd, and so on) and colored according to a chosen color scheme. For each area you can display the current value, the daily minimum, and the daily maximum. ## Data requirements - Data selection: by dimension (`select: "dimension"`), minimum 1 and maximum 50 items (one per area). Allowed value type: `Number`. - Data fetching: live and history are both supported (daily min/max are derived from history). - Areas and data points are mapped automatically by position/order; the first area is bound to the first data point, etc. ## Options | Option | Type | Default | Description | | --- | --- | --- | --- | | `type` (Geographical Areas) | `"json" \| "dimension" \| "zones"` | `"zones"` (preset uses `"json"`) | How the areas are sourced. Selected via the geography selector under "Geographical Areas" — "Select the geographical areas to be displayed on the map". | | `districtsFromZones` | `string[]` | `—` | IDs of predefined zones used as areas (when `type` is `zones`). Source: From Zones. | | `districtFromDimension` | `DataItemDimensionIdentifier[]` | `—` | A geo data dimension whose value defines the areas (when `type` is `dimension`). Source: From Datasource. | | `districts` | GeoJSON | `—` | A raw GeoJSON / ESRI shape definition (when `type` is `json`). Source: External Source. | | `showCurrent` (Show current value) | `boolean` | `true` | Display the current value (the "Current" statistic) for each area. | | `showMin` (Show daily minimum) | `boolean` | `true` | Display the daily minimum (the "Minimum" statistic) for each area. | | `showMax` (Show daily maximum) | `boolean` | `true` | Display the daily maximum (the "Maximum" statistic) for each area. | | `colorScheme` (Color Scheme) | `"green-red" \| "blue-red" \| "viridis"` | `"green-red"` | Color scheme used to shade areas by value. Labels: Green-Red, Blue-Red, Viridis. | Note: the area-to-value mapping is automatic and based on feature order — no manual mapping field is exposed in the current settings UI. ## Presets - Area Values with Daily Statistics — Shows current values and daily min/max statistics for defined areas on a map. Use to compare area-level metrics and their daily ranges. Tags: `map`. Layout `[12, 24]`. Default config: `type: "json"`, `showCurrent: true`, `showMin: true`, `showMax: true`, `colorScheme: "green-red"`. ## How to use 1. Add the "Area Values with Daily Statistics" widget to a dashboard. 2. Select between 1 and 50 numeric data points — one per area you intend to display. 3. In the settings panel, define the areas under "Geographical Areas" using the geography selector (From Zones, From Datasource, or External Source / GeoJSON). Areas are bound to data points in order. 4. Under "Display Options", toggle whether to show the current value, the daily minimum, and the daily maximum. 5. Pick a color scheme (Green-Red, Blue-Red, or Viridis) to control how areas are shaded by value.