chartcn

Registry

Install chartcn variants from the shadcn-compatible registry.

Each chart variant is a shadcn registry item. Install with the official CLI — sources are ChartContainer + Recharts.

Install

Set the host:

export CHARTCN_REGISTRY_URL=https://chartcn-web.vercel.app
# or locally:
export CHARTCN_REGISTRY_URL=http://localhost:3000

Then:

# base primitives
npx shadcn@latest add chart card

# any variant
npx shadcn@latest add https://chartcn-web.vercel.app/r/chart-area-basic.json
npx shadcn@latest add $CHARTCN_REGISTRY_URL/r/chart-area-stacked.json
npx shadcn@latest add $CHARTCN_REGISTRY_URL/r/chart-bar-grouped.json
npx shadcn@latest add $CHARTCN_REGISTRY_URL/r/chart-line-multi.json

Local routes: GET /r/<name>.json and GET /r/registry.json.

Naming

Variants follow chart-<family>-<variant> (for example chart-area-stacked-expand).

Learn more

On this page