fix(gauge): render single value arc with correct Tailwind v4 colors
The gauge rendered as multiple black rings. Two causes: 1. recharts RadialBarChart draws each data entry as a CONCENTRIC RING, not an arc segment, so the 3 "track band" entries + value produced 4 nested rings. Render a single value arc over a neutral background track instead, colored by status, with the readout absolutely centered (replacing the -mt-12 hack). 2. The fills used hsl(var(--primary)) / hsl(var(--chart-1)) etc., but this project's Tailwind v4 theme (index.css) defines colors as --color-* holding full hex values (--color-primary: #4f8cff). So the references were doubly invalid (wrong name + hsl() wrapping a hex) -> invalid SVG fill defaults to black. Use var(--color-*) directly, with the semantically correct chart colors: ok=--color-chart-2 (green), warn=--color-chart-3 (amber), crit=--color-chart-4 (red). Also fix the same hsl(var(--x)) -> var(--color-x) bug in LineSeriesChart's tooltip contentStyle (popover/border/popover-foreground). The line stroke palette already used the correct var(--color-chart-N) form. 166/166 frontend tests pass; typecheck + ESLint clean.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
dir: frontend/src/components
|
||||
|
||||
## role
|
||||
Reusable UI component library providing presentation-layer building blocks (tables, cards, charts, dialogs, widgets) for the frontend application.
|
||||
Shared UI component library providing reusable React display, table, dialog, card, chart, and widget components for the frontend application.
|
||||
## parent
|
||||
index: frontend/src/.pi-map.index.md
|
||||
map: frontend/src/.pi-map.md
|
||||
@@ -28,6 +28,7 @@ map: frontend/src/.pi-map.md
|
||||
- PinnedServiceLink.tsx
|
||||
- SectionCard.tsx
|
||||
- SelectionRailCard.tsx
|
||||
- ServiceTestPanel.tsx
|
||||
- SessionActivityPanel.tsx
|
||||
- TabbedCard.tsx
|
||||
- WidgetConfigDialog.tsx
|
||||
|
||||
Reference in New Issue
Block a user