Chart

A set of wrapper components that extend Recharts with styled tooltips, legends, and theme-aware colors. For full chart capabilities, refer to the Recharts documentation.

Bar Chart

Area Chart

Line Chart

API Reference

ChartRoot

Container component that provides chart configuration context and wraps children in a ResponsiveContainer.

PropTypeDefaultDescription
config*ChartConfig-Configuration object mapping data keys to labels, colors, and optional icons
classNamestring-Additional CSS classes for the container
styleReact.CSSProperties-Inline styles (merged with generated CSS variables)
...propsReact.ComponentProps<"div">-Standard div element props

ChartConfig

Configuration object that maps data keys to display properties. Each key corresponds to a dataKey used in your chart series.

PropTypeDefaultDescription
label*string-Display label shown in tooltips and legends
color*string-Color value (CSS color, HSL, or CSS variable)
iconReact.ComponentType<{ className?: string }>-Optional icon component displayed in tooltips and legends

ChartTooltipContent

Styled tooltip content component for use with Recharts Tooltip.

PropTypeDefaultDescription
indicator'dot' | 'line' | 'dashed''dot'Style of the color indicator next to each item
hideLabelbooleanfalseHide the tooltip label/title
hideIndicatorbooleanfalseHide the color indicator
labelKeystring-Payload property to use as the tooltip label instead of the default label
nameKeystring-Payload property to use as item names instead of config labels
classNamestring-Additional CSS classes for the tooltip container
labelClassNamestring-Additional CSS classes for the label
formatter(value, name, item, index, payload) => ReactNode-Custom formatter function for tooltip values

ChartLegendContent

Styled legend content component for use with Recharts Legend.

PropTypeDefaultDescription
classNamestring-Additional CSS classes for the legend container
nameKeystring-Payload property to use as item names instead of config labels
verticalAlign'top' | 'bottom'-Vertical alignment (adjusts padding accordingly)

useChartContext

Hook to access the chart configuration from within child components.

PropTypeDescription
configChartConfigThe chart configuration object passed to ChartRoot

Types

Type definitions exported from the chart package.

PropTypeDescription
ChartConfigRecord<string, { label: string; color: string; icon?: ComponentType }>Configuration object type for chart series
ChartRootPropsinterfaceProps for ChartRoot component
ChartTooltipContentPropsinterfaceProps for ChartTooltipContent component
ChartLegendContentPropsinterfaceProps for ChartLegendContent component
IndicatorType'dot' | 'line' | 'dashed'Tooltip indicator style type