feat(frontend): más KPIs con sparklines + gráfico ingresos/unidades por producto#27
Merged
Merged
Conversation
…or producto Enriquece el dashboard con nuevos cálculos derivados en cliente (sin tocar backend): - KPIs nuevos: clientes únicos, productos únicos y mejor día (importe + fecha), más sparklines de tendencia diaria en las tarjetas de ingresos y ventas. - Sustituye el bar simple por un ComposedChart 'Revenue & units by product': barras de importe (eje izq.) + línea de unidades (eje der.), que cruza dos métricas y revela productos caros vs. de mucho volumen. - analytics.ts: salesCountByDate, productRevenueUnits y computeKpis ampliado (distinctCustomers/Products, bestDay). Funciones puras testeadas. - Sparkline.tsx: SVG inline sin dependencias, tematizado vía currentColor. - ChartTooltip soporta varias series (revenue + units). - Elimina ByProductChart (reemplazado por el ComposedChart). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sigue al rediseño (#26). Enriquece el dashboard con más datos y cálculos nuevos, todo derivado en cliente (sin tocar backend).
Mejoras
1. Más KPIs + sparklines
2. Ingresos + unidades por producto (ComposedChart)
Cambios técnicos
analytics.ts:salesCountByDate,productRevenueUnits,computeKpisampliado (distinctCustomers/Products, bestDay). Funciones puras testeadas.Sparkline.tsx: SVG inline sin dependencias, tematizado víacurrentColor(CSS var encolor, no en atributo SVG).ChartTooltipsoporta múltiples series (Revenue + Units).ByProductChart(reemplazado por el ComposedChart).Verificación
lint✅ ·test:run✅ (23 tests) ·build✅🤖 Generated with Claude Code