Chart Component

Basic chart types with recharts integration and orbit-capsule styling.

Line Chart

Simple trend visualization.

Bar Chart

Categorical data comparison.

Area Chart

Stacked area with gradients.

Pie Chart

Proportional data distribution.

Desktop58%
Mobile32%
Tablet10%

API Reference

ChartContainer Props

Wrapper component for recharts charts. Provides configuration context and styling.

PropTypeDefaultDescription
configChartConfigColor and label configuration for chart data keys
classNamestringAdditional CSS classes for styling

ChartTooltip Props

PropTypeDefaultDescription
contentReact.ReactNodeCustom content component (typically ChartTooltipContent)

ChartTooltipContent Props

Renders formatted tooltip content with color indicators and values.

PropTypeDefaultDescription
hideLabelbooleanfalseHide the data key label
hideIndicatorbooleanfalseHide the color indicator dot

ChartLegend Props

PropTypeDefaultDescription
contentReact.ReactNodeCustom content component (typically ChartLegendContent)

ChartLegendContent Props

Renders formatted legend with color indicators and labels.

PropTypeDefaultDescription
hideIconbooleanfalseHide the color indicator icon

ChartConfig Type

Object mapping data keys to chart configuration. Each key contains a label and color (CSS variable or hex value).

type ChartConfig = Record<string, { label: string; color: string }>

Notes

  • These components are wrappers around recharts components
  • Use CSS variables like var(--accent) for theme-aware colors
  • All chart components support standard recharts props