# Project Timeframes Table
Widget type: `opendash-widget-table-dfh` · Plugin: `@opendash/plugin-highcharts`

## Description
A specialized table for tracking projects through fixed project phases and forecasting their completion. In addition to the standard historical-value columns, it adds two computed columns for any data item whose value type is named "Projektphase" (project phase): "Fertigstellung in Tagen" (completion in days) and "Fertigstellung an Datum" (completion on date). The widget calculates an average duration for each phase (phases 0–15) from the selected reference values and sums the durations from the current phase to the final phase to project the expected remaining time and finish date. A search field lets you filter rows.
> Note: This widget's labels and preset texts (e.g. "Projektzeiträime", "Fertigstellung in Tagen") are German in the source and are not provided in the English translation file; the English titles here are translations of the German strings.
## Data requirements
- Selection: by dimension (`select: "dimension"`).
- Minimum data items: 1 (no maximum).
- Allowed value types: Number, Boolean, String, Geo, Object.
- Data fetching: live and history are both enabled; the built-in date selector of the data filter is hidden (`hideDateSelect: true`) and the timeframe is controlled from the widget's own toolbar.
- For the forecast columns to appear, at least one selected data item must have a value type named "Projektphase" (project phase).
## Options
| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `rows` | string[] | `[]` (preset) | The reference values used to compute per-phase durations. In the settings UI a multi-select lists the selected data items (and date dimensions); the accompanying hint reads "Welche Werte sollen die Zeit berechnen?" (Which values should calculate the time?). |
| `cols` | string[] | `[]` (preset) | Column dimensions for the underlying pivot grouping. Present in the config; the corresponding settings control is currently commented out in the UI. |
| `values` | [aggregation, string] | `["max", "second"]` (preset) | Aggregation operation and the value/time dimension to aggregate (e.g. max over the "second" date dimension). |
| `filters` | Record<string, any[]> | `{}` (preset) | Per-dimension value filters applied to the data before display. |
| `includeItemName` | boolean | — (unset) | When set, includes the data-source name in value column headers (inherited table behavior). |
| `averageCalculationItems` | `Array<{ phase, source, id, dimension }>` | — (unset) | Optional explicit mapping of items/dimensions used to derive the per-phase average durations. |
| `showDeleteButton` | boolean | — (unset) | When set, shows a per-row delete button (executes `deleteAction`). Set programmatically. |
| `deleteAction` | function | — (unset) | Callback invoked when a row delete is confirmed. Set programmatically. |
| `showExportButton` | boolean | — (unset) | When set, shows a CSV export button inside the widget. |
## Presets
- Projektzeiträume (Project Timeframes) — Projektübersicht inklusive voraussichtlicher Fertigstellung (Project overview including expected completion). Layout 6×24. Default config: `values: ["max", "second"]`, empty `rows`/`cols`/`filters`, history set to a relative range of the last 12 months with live updates enabled. Tagged `bi`.
This widget has no separate data-explorer entry.
## How to use
1. Add the "Project Timeframes Table" widget (it appears under the "bi" category in the data explorer / widget catalog as "Projektzeiträume").
2. Select your project data items. Include the item whose value type is named "Projektphase" so the completion-forecast columns are generated.
3. Open the settings and, in the multi-select, choose the reference values used to compute the average duration per phase.
4. Use the in-widget toolbar to set the timeframe (relative/live or absolute range) and the search field to filter rows.
5. Read off the projected remaining days and completion date in the "Fertigstellung in Tagen" and "Fertigstellung an Datum" columns; export to CSV if needed.