# Number of Issues
Widget type: `openservice-number-of-issues` · Plugin: `@opendash/plugin-openservice`

## Description
Counts tickets in the selected time range. Use this to monitor issue volume and spot trends or spikes over time. The widget fetches the maintenance tickets for the chosen source and renders them as a chart (currently an ECharts donut/pie), with a footer showing the total number of tickets. Optionally, each slice can be sized according to the ticket's priority instead of being weighted equally. The ticket list refreshes periodically.
## Data requirements
- `dataItems`: select by `source`, minimum 1, maximum 1 (no value-type restriction). The first selected source's tickets are loaded.
- `dataFetching`: history required (`history: true`, `historyRequired: true`).
The widget queries the ticket manager for the selected source and counts/visualises the returned tickets.
## Options
| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `type` (Type settings) | `"pie" \| "column"` | `"column"` (Data Explorer) | Visualisation type. The settings panel offers "Pie chart" and "Bar chart". |
| `operation` | `"duration" \| "count"` | `"count"` | Aggregation operation applied to the tickets (count of tickets vs. duration). |
| `sizeByPriority` (Size by priority) | `boolean` | `false` | When enabled, chart segments are sized by each ticket's priority value; otherwise every ticket is weighted equally. |
The settings panel header "Type settings" with the description "Please select the type of visualisation" lets you choose the chart type and toggle "Size by priority".
## Presets
- Data Explorer: **Number of Issues** — Counts tickets in the selected time range. Use this to monitor issue volume and spot trends or spikes over time. Icon `fa:chart-bar`, default config `operation: "count"`, `type: "column"`.
- Preset: **Number of Issues** — same title/description. Tagged `maintenance`, layout `[6, 6]`. Default config `operation: "count"`.
## How to use
1. Add the "Number of Issues" widget from the Data Explorer or dashboard.
2. Select exactly one source whose tickets you want to count.
3. In the settings, open **Type settings** and choose the visualisation (Pie chart or Bar chart).
4. Optionally enable **Size by priority** to weight each segment by ticket priority rather than counting tickets equally.
5. The widget shows the chart plus a "Total tickets" count in the footer, refreshing the ticket data periodically.