Defaults
agg=sum,valueFormat=number,digitsInfo=1.0-1.- Comparison staat standaard aan met
comparisonSource=filterSets. comparisonMode=difference,comparisonValueAgg=sum.
Widget reference
KPI is de single-value widget met aggregation, formatting, icon styling en meerdere comparison-bronnen (filter sets, static, field, view).
agg=sum, valueFormat=number, digitsInfo=1.0-1.comparisonSource=filterSets.comparisonMode=difference, comparisonValueAgg=sum.| Key | Type | Beschrijving |
|---|---|---|
valueField | string | Bronveld voor KPI (verplicht). |
agg | sum/avg/min/max/count/countDistinct | Aggregatie op valueField. |
filter | object | Widget filter JSON; moet object zijn. |
kpiLabel | string | Label onder/naast waarde. |
icon, iconColor | string | PrimeIcon class en kleur. |
| Instelling | Waarden | Uitleg |
|---|---|---|
valueFormat | string/number/decimal/currency/percent/date/datetime/time | Outputformaat van KPI waarde. |
digitsInfo | string | Numerieke precisie voor number/decimal/currency/percent. |
currencyCode, currencyDisplay | string | Valuta instelling voor currency format. |
dateFormat | string | Datumweergave bij date/datetime/time format. |
prefix, suffix | string | Tekst voor/na KPI waarde. |
KPI-widgets kunnen optioneel een compacte trendgrafiek onder de waarde en compare-labels tonen. Deze trend gebruikt dezelfde datasource en filters als de KPI, maar heeft zijn eigen groeps- en datumguard-instellingen.
| Key | Type | Beschrijving |
|---|---|---|
trend.enabled | boolean | Schakelt de compacte trendgrafiek in. |
trend.chartType | line/area/bar | Visualisatievorm van de trend. |
trend.labelField | string | Groeperingsveld voor de x-as, meestal een datumveld. |
trend.valueField | string | Optioneel waardeveld; valt terug op valueField van de KPI. |
trend.agg | sum/avg/min/max/count/countDistinct | Aggregatie voor de trendpunten. |
trend.sortDirection | asc/desc | Sorteervolgorde van de gegroepeerde punten. |
trend.limit | number | Optioneel maximum aantal punten in de trend. |
trend.minDateRangeDays | number | Vergroot alleen voor de trend de actieve ...From-datum backward als het geselecteerde datumbereik te klein is. |
trend.color | string | Optionele kleur override voor de trendgrafiek. |
trend.minDateRangeDays.| Key | Beschrijving | Wanneer verplicht |
|---|---|---|
comparisonEnabled | Master toggle voor compare badge. | Niet verplicht. |
comparisonSource | filterSets, static, field, view. | Als comparison aan staat. |
comparisonMode | difference, percent, both. | Optioneel, default difference. |
comparisonStaticValue | Vaste baseline. | Bij comparisonSource=static. |
comparisonValueField | Veld voor vergelijking. | Bij field of view. |
comparisonValueAgg | sum/avg/min/max/count/countDistinct | Bij field of view. |
comparisonViewUid | View identifier als baseline bron. | Bij comparisonSource=view. |
comparisonDateFilterKey | Date-range filterkey fallback. | Alleen bij filterSets. |
comparisonShowFilters | Toont actieve filterwaarden in compare tag. | Optioneel. |
comparisonLabelBefore, comparisonLabelAfter | Tekst voor/na delta. | Optioneel. |
comparisonReverseColors | Wisselt groen/rood logica om. | Optioneel. |
valueField kan de widget niet opgeslagen worden.comparisonSource=static is een numerieke static value vereist.comparisonSource=view is comparisonViewUid verplicht.comparisonSource=field/view valt comparisonValueField terug op valueField als leeg.{
"valueField": "revenue",
"agg": "sum",
"valueFormat": "currency",
"currencyCode": "EUR",
"currencyDisplay": "symbol",
"digitsInfo": "1.0-0",
"kpiLabel": "Omzet",
"icon": "pi pi-chart-line",
"iconColor": "#0ea5e9",
"comparisonSource": "view",
"comparisonViewUid": "revenue_previous_period",
"comparisonValueField": "revenue",
"comparisonValueAgg": "sum",
"comparisonMode": "both",
"comparisonLabelBefore": "vs",
"comparisonLabelAfter": "vorige periode",
"trend": {
"enabled": true,
"chartType": "area",
"labelField": "order_date",
"valueField": "revenue",
"agg": "sum",
"sortDirection": "asc",
"limit": 30,
"minDateRangeDays": 7
}
}