Chart
Understand the design system and contribute to it
Component preview
The live preview for UI components is handled by components/atoms/codedocs/ComponentPreview.tsx. Use it directly inside MDX whenever you want a playground-style embed. Provide componentProps to set default values and propOptions to surface toggle-able props next to the preview.
Prop reference
Auto-generated from the component source
ChartContainer
idclassNamechildrenconfig
React.ComponentProps<"div"> & { config: ChartConfig; children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"]; }
ChartLegendContent
classNamehideIcon= falsepayloadverticalAlign= "bottom"nameKey
React.ComponentProps<"div"> & Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & { hideIcon?: boolean; nameKey?: string; }
ChartStyle
idconfig
{ id: string; config: ChartConfig; }
ChartTooltipContent
activepayloadclassNameindicator= "dot"hideLabel= falsehideIndicator= falselabellabelFormatterlabelClassNameformattercolornameKeylabelKey
React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<"div"> & { hideLabel?: boolean; hideIndicator?: boolean; indicator?: "line" | "dot" | "dashed"; nameKey?: string; labelKey?: string; }