byronwade/ui
Application UI

Charts · Application UI

Chart

A Recharts wrapper that injects CSS color variables from a config map and provides tooltip and legend sub-components styled to match the design system.

Feature showcase

Installation

Features

  • 11 examples

    Default, Bar Chart, Custom Tooltip, Donut Chart, Legend Variants, Line Chart, Pie Chart, Radial Bar, Stacked Bar, Theme Colors, Tooltip Variants.

API

Props

PropTypeDefaultDescription
configChartConfig-Map of data-key names to label, icon, and color/theme values; drives CSS variable injection for all chart series.
childrenReact.ComponentProps<typeof ResponsiveContainer>['children']-A Recharts chart element (e.g. AreaChart, BarChart) rendered inside a ResponsiveContainer.
idstring-Optional stable ID used to scope the injected CSS variables; auto-generated when omitted.
initialDimension{ width: number; height: number }{ width: 320, height: 200 }Fallback dimensions passed to ResponsiveContainer before the first layout measurement.
classNamestring-Additional Tailwind / CSS classes merged onto the outer div.

Source and related

FilePath
Componentregistry/ui/chart.tsx
Default examplecontent/examples/chart/default.tsx
Bar Chart examplecontent/examples/chart/bar-chart.tsx
Custom Tooltip examplecontent/examples/chart/custom-tooltip.tsx
Donut Chart examplecontent/examples/chart/donut-chart.tsx
Legend Variants examplecontent/examples/chart/legend-variants.tsx
Line Chart examplecontent/examples/chart/line-chart.tsx
Pie Chart examplecontent/examples/chart/pie-chart.tsx
Radial Bar examplecontent/examples/chart/radial-bar.tsx
Stacked Bar examplecontent/examples/chart/stacked-bar.tsx
Theme Colors examplecontent/examples/chart/theme-colors.tsx
Tooltip Variants examplecontent/examples/chart/tooltip-variants.tsx