Skip to content
Charts

Chart

Low-level recharts primitive: ChartContainer, tooltip, cursor, legend.

Import

tsx
import { ChartContainer, ChartTooltip, ChartTooltipContent, ChartCursor, ChartLegend, ChartLegendContent } from "@cronus-ui/ui";
bash
npx cronus-ui add chart

Examples

API Reference

Generated from the component's exported types.

ChartCursorProps

Skip ChartCursorProps props table
PropTypeDefaultDescription
x
number
y
number
width
number
height
number0
top
number0
left
number
points
{ x: number; y: number }[]
payload
TooltipPayloadItem[]
labelKey
stringField on the datum shown in the axis pill.
showAxisLabel
booleantrueDraw the hovered label as a pill on the x-axis. Turn off when the axis already prints that tick — otherwise the pill stacks on the label (e.g. "Aug 6" over "Aug 7").