FioriSwiftUICore provides three KPI components that together cover numeric indicators, progress visualizations, and grouped KPI dashboards.
| Component | Purpose |
|---|---|
KPIItem | Single KPI value with an optional caption |
KPIProgressItem | KPI shown as a circular progress chart |
KPIHeader | Horizontal row of up to four KPI items with an optional banner message |
KPIItem
KPIItem renders a formatted KPI value composed of typed sub-items (metric digits, units, icons, trend indicators) alongside an optional caption.
Parameters
Label shown below the KPI value.
Array of sub-items that make up the formatted KPI value. Each item has a
kPISubItemValue: TextOrIcon and a kPISubItemType: KPISubitemType (.metric, .unit, .icon).Controls the overall size of the KPI display. Use
.small for compact layouts and .large for featured KPIs.Horizontal alignment of the KPI value and caption.
Usage
KPIProgressItem
KPIProgressItem displays a KPI value inside a circular progress ring. It accepts a Binding<KPIItemData> so the ring animates as the value changes.
Parameters
The KPI data to visualize. Use
KPIItemData.percent(_:) for a 0–1 fraction, or KPIItemData.fraction(_:_:_:) for a numerator/denominator pair.Label shown below the circular chart.
Secondary label beneath the caption.
Size of the circular chart.
.small items are hidden in KPIHeader.Usage
KPIHeader
KPIHeader arranges up to four KPIItem or KPIProgressItem views in a horizontal row. Items beyond the first four are ignored. KPIProgressItem items with .small chart size are also hidden automatically.
Parameters
Array of
KPIItem or KPIProgressItem values. Maximum of four are displayed.Optional banner displayed below the KPI row.
When
true, items retain their supplied order even on smaller screens.Custom spacing between KPI items. Uses the system default when
nil.Controls the visibility of the header.