feat: adopt ShadCN chart primitives
Add ChartContainer, ChartConfig, ChartTooltip, ChartTooltipContent primitives ported from ShadCN's chart pattern. Refactor all 3 chart locations (dashboard, funnels, uptime) to use CSS variable-driven theming instead of duplicated CHART_COLORS_LIGHT/DARK objects. - Add --chart-1 through --chart-5, --chart-grid, --chart-axis CSS vars - Remove duplicated color objects from 3 files (-223 lines) - Add accessibilityLayer to all charts - Rounded bar corners on funnel chart - Tooltips use Tailwind dark classes instead of imperative style props Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,25 @@
|
||||
--color-success: #10B981;
|
||||
--color-warning: #F59E0B;
|
||||
--color-error: #EF4444;
|
||||
|
||||
/* * Chart colors */
|
||||
--chart-1: #FD5E0F;
|
||||
--chart-2: #3b82f6;
|
||||
--chart-3: #22c55e;
|
||||
--chart-4: #a855f7;
|
||||
--chart-5: #f59e0b;
|
||||
--chart-grid: #f5f5f5;
|
||||
--chart-axis: #a3a3a3;
|
||||
}
|
||||
|
||||
.dark {
|
||||
--chart-1: #FD5E0F;
|
||||
--chart-2: #60a5fa;
|
||||
--chart-3: #4ade80;
|
||||
--chart-4: #c084fc;
|
||||
--chart-5: #fbbf24;
|
||||
--chart-grid: #262626;
|
||||
--chart-axis: #737373;
|
||||
}
|
||||
|
||||
body {
|
||||
|
||||
Reference in New Issue
Block a user