Indicator
A headline statistic or single feature value with optional context lines, an
icon, and number or date formatting. It computes a count/sum/avg/min/max
over a Feature Service field, or shows a single feature's field value.
At a glance
| Type key | indicator |
| Default size | 3 × 4 (min 2 × 3) |
| Data source | A Feature Service layer |
| Emits | — |
| Receives | filter (from a Map's map:extent-change) |
| Source | src/widgets/widgets/indicator/ |
Configuration
| Field | Type | Default | Purpose |
|---|---|---|---|
featureServiceId | string? | — | Feature Service item id. |
featureServiceTitle | string? | — | Display title of the service. |
featureLayerId | number? | — | Sub-layer id. |
featureLayerName | string? | — | Sub-layer name. |
filterClauses | clause[] | [] | Attribute filter applied to the data source. Each clause is field operator operand; clauses join left-to-right with AND/OR into a SQL where. |
valueType | "statistic" | "feature" | "statistic" | Compute a statistic or show a feature field. |
statistic | "count" | "sum" | "avg" | "min" | "max" | "count" | The statistic (statistic mode). |
statisticField | string? | — | Field the statistic applies to (not needed for count). |
featureField | string? | — | Field to display (feature mode). |
topText | string? | — | Smaller line above the value. Supports {field} tokens. |
bottomText | string? | — | Smaller line below the value. Supports {field} tokens. |
topStyle / valueStyle / bottomStyle | object | — | Optional color (hex) and fontSize (8–120 px) per line. |
icon | object | — | ref (an icon reference: a built-in Lucide icon, an uploaded custom icon, or the layer's renderer symbol), position ("before" | "after"), color, size (8–120, default 24). |
format | object | see below | Display formatting for the main value (number scaling/units or date). |
The format object:
| Field | Type | Default | Purpose |
|---|---|---|---|
kind | "number" | "date" | "number" | Render the value as a number or a date. |
decimalPlaces | number (0–6) | 0 | Decimal places for numbers. |
useGrouping | boolean | true | Group digits with locale thousands separators. |
notation | "standard" | "compact" | "standard" | Plain digits or a compact form (e.g. 1.2M). |
multiplier | number | 1 | Factor applied before formatting, e.g. 0.000001 to turn m² into km². |
prefix | string | "" | Text prepended to the value, e.g. "$". |
suffix | string | "" | Text appended to the value, e.g. " km²". |
dateStyle | "short" | "medium" | "long" | "full" | "medium" | Date length preset (date kind). |
includeTime | boolean | false | Append a short time alongside the date. |
Configs saved before this option used a top-level
decimalPlaces; it is migrated intoformat.decimalPlacesautomatically.
Config panel
- Data — pick the Feature Service and sub-layer (a feature Layer or a Table), choose statistic vs. feature mode, then select the statistic and field; optionally filter by a map extent. The selected Feature Service shows a preview card (thumbnail, title, summary, and an open-in-portal link); see Picking an ArcGIS data source. A Filter section under the layer picker lets you limit the widget to features matching a SQL expression you build clause by clause (field, operator, and a value or another field), joined with AND/OR.
- Appearance — edit the top/value/bottom text (with a
{field}token helper), set per-line color and font size, configure the icon, and format the value. The Formatting section switches between Number (decimal places, thousands grouping, standard/compact notation, a unit multiplier with ÷1K/÷1M/÷1B presets, and a prefix/suffix) and Date (date style preset and an optional time). The prefix/suffix fields include an insert symbol palette for superscripts (m²), subscripts (CO₂), degrees, units, fractions, and currency, so glyphs that are hard to type can be inserted at the caret.
Cross-widget actions
The Indicator receives a filter action carrying a MapExtentPayload. Wire
a Map's map:extent-change to narrow the features used for
the statistic or value.
Notable behavior
- Unconfigured until a Feature Service is picked.
- The
countstatistic needs no field; the others require one. - The optional attribute Filter is combined with any received map-extent filter (both must match).
{field}tokens in the top/bottom text resolve from feature attributes.- The value
multiplierruns before display, so unit conversions (e.g. m² → km²) don't change the underlying query. - Date formatting expects an epoch value, such as a date field or a
min/maxstatistic over a date field. - A placeholder is shown until data loads.
Icon reference
The optional icon is stored as an icon reference — a small object that names the chosen icon independently of how it's drawn:
| Kind | Shape | Notes |
|---|---|---|
lucide | { kind: "lucide", name } | A built-in Lucide icon by kebab-case name. |
resource | { kind: "resource", path } | A custom icon uploaded to the workspace; path is its resource path. |
layer-symbol | { kind: "layer-symbol" } | The referenced feature layer's renderer symbol, resolved live. |
Pick an icon from the icon picker, which has up to three tabs:
- Icons — search the full Lucide library.
- Custom — upload your own image, crop it to a square, and store it as a 256×256 PNG resource on the workspace's portal item. Custom icons are shared across every widget in the workspace and require an open workspace.
- Layer — shown only when the widget references a feature layer. Uses that layer's own renderer symbol as the icon. The symbol is read from the layer's metadata (no extra request) and resolved live, so changes an author makes to the layer's symbology in the webmap appear on the next load. For the indicator's aggregate value the renderer's representative symbol is used.
Lucide icons are tinted by the color setting; custom and layer-symbol images
render as-is. For backward compatibility a bare string is read as a Lucide
name. See Custom icons for where
uploads live.