Chart

Elegant, data-driven charts built with Recharts — ready to drop into your applications.

recharts

Installation


1

Install the following dependencies:

npx shadcn@latest add https://sbthemes.com/r/chart.json

Examples


Line chart

For more information and supported props about line charts, refer to the Line chart.

Pie chart

For more information and supported props about pie charts, refer to the Pie chart.

Area chart

For more information and supported props about area charts, refer to the Area chart.

Scatter chart

For more information and supported props about scatter charts, refer to the Scatter chart.

Radar chart

For more information and supported props about radar charts, refer to the Radar chart.

Funnel chart

For more information and supported props about funnel charts, refer to the Funnel chart.


API Reference

For additional chart types and supported props, refer to the Recharts documentation.

ChartContainer

PropTypeDefault
childrenReact.ReactNode-
configChartConfig-

ChartConfig

PropTypeDefault
labelReact.ReactNode-
iconReact.ComponentType-
colorstring-
theme{ light: string; dark: string }-

ChartTooltipContent

PropTypeDefault
indicatorline,dot,dasheddot
hideLabelbooleanfalse
hideIndicatorbooleanfalse
labelReact.ReactNode-
labelFormatter(label, payload) => ReactNode-
formatter(value, name, item) => ReactNode-
colorstring-
nameKeystring-
labelKeystring-

ChartLegendContent

PropTypeDefault
hideIconbooleanfalse
verticalAligntop,bottombottom
nameKeystring-