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

.cronus

The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.

PortedParity: MatchGeometry 1/1Pixel diff 0 pxLogic 1/1Parity scoreboard
default.cronus
app "audit-fixtures" {
  port 5176
}

style {
  preset aurora
  theme dark
}

component ChartDefault layout:inline style:chart {
  label "Series"
  text "4"
  text "8"
  text "6"
}

page "/audit/chart/default" type:custom {
  use ChartDefault
}

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
string—Field 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").