Skip to content
Cynco UI

Components · Data display

ChartContainer

shadcn chart wrapper for Recharts: maps a config to --color-<key> variables and supplies tooltip and legend content.

import { ChartContainer } from "@cynco-labs/ui";

Example

Use

Revenue, expense and cash charts.

Props

config {key: {label, color | theme}} and one Recharts chart as child (import it from recharts); ChartTooltip + ChartTooltipContent, ChartLegend + ChartLegendContent.

Notes

Colour series with chart-series-1…8 in order; grid lines chart-grid-stroke.

Source Demo source Markdown