fix: add KPI tile widget type to the dashboard (#26)
CI / build-and-test (pull_request) Successful in 2m24s
CI / build-and-test (pull_request) Successful in 2m24s
Adds a non-chart dashboard widget: a large value with its label, an optional signed delta versus the previous period, and an optional sparkline. Four tiles now sit above the charts, 3x1 each. - KpiTile draws no surface of its own and fills the grid item's, styled from the --dialect-* token layer; the delta's up/down colors are new tokens rather than literals, so they follow the light/dark toggle. - Value and delta share one row: stacking them costs a line the tile does not have at its default height of one grid cell. - SparklineChart is a chrome-free line chart built on DialectTheme, so it shares the palette and font with the real charts. - ApexCharts' sparkline.enabled drops the axes on the initial render but updateOptions (how the theme toggle recolors a chart) brings the y-axis labels back; they are hidden in CSS, which reaches the chart SVG since it renders into light DOM. The registry registration the issue asks for is left out: #21 is blocked, so there is no widget picker to register with yet. The tiles are wired into DashboardView the same way the chart widgets are, and their values come from the translation bundle until the data service (#20) lands. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0124BiJikbhbiEsNfJxdWM69
This commit is contained in:
@@ -32,6 +32,15 @@ gridstack.widgetText=Tarjeta de colocación libre.
|
||||
gridstack.dragHandle=Mover
|
||||
gridstack.close=Cerrar
|
||||
|
||||
kpi.revenueTotal=Ingresos totales
|
||||
kpi.revenueTotal.value=1,24 M€
|
||||
kpi.openOrders=Pedidos abiertos
|
||||
kpi.openOrders.value=38
|
||||
kpi.newCustomers=Nuevos clientes
|
||||
kpi.newCustomers.value=112
|
||||
kpi.averageOrderValue=Valor medio del pedido
|
||||
kpi.averageOrderValue.value=486 €
|
||||
|
||||
chart.revenueSeries=Ingresos 2026
|
||||
chart.pointClick=Serie {0}, punto {1}
|
||||
chart.sliceClick=Sector {0}
|
||||
|
||||
Reference in New Issue
Block a user