Line, area and bar charts on Recharts, in graphite and one accent with series told apart by line style, with a crosshair tooltip, a legend and a table view.
API reference
Generated from the types. Every part also takes className.
ChartContainer
Also takes every prop of <div>.
- childrenrequired
ReactNode & ReactElement- configrequired
ChartConfig- labelrequired
string
ChartSwatch
- dataKeyrequired
string
ChartTooltipContent
Also takes every prop of Partial<TooltipContentProps<number, string>>.
- formatter
Formatter<number, string> & ((value: number, name: string, item: TooltipPayloadEntry, index: number, payload: TooltipPayload) => ReactNode | [ReactNode, ReactNode]) & ((value: number, key: string) => ReactNode)Function to customize the value in the tooltip. If you return an array, the first entry will be the formatted "value", and the second entry will be the formatted "name"- labelFormatter
((label: ReactNode, payload: readonly Payload<number, string>[]) => ReactNode) & ((label: ReactNode, payload: TooltipPayload) => ReactNode) & ((label: unknown) => ReactNode)The formatter function of label in tooltip.
ChartLegendContent
- payload
readonly { dataKey?: unknown; value?: unknown; }[]
ChartTable
- datarequired
T[]- xrequired
keyof T & string- xLabelrequired
string- configrequired
ChartConfig
Other parts
ChartTooltiptakes every prop ofTooltip.ChartLegendtakes every prop ofLegendProps (except ref).