Skip to content
ChartslibraryUI
Get Pro

Upgrading

Charts are source files in your project, so an update is something you run, not something that happens to you. This page shows how to see what changed, update, and keep your own changes.

Check your version

The second line of every installed file names its version:

// line-chart.tsx · ChartslibraryUI 1.5.1 · MIT License · Updating replaces this file: …

To list the versions in a project at once:

grep -rhoE "ChartslibraryUI( Pro)? [0-9]+\.[0-9]+\.[0-9]+" components/charts | sort | uniq -c

One version everywhere means the chart files and core/ match. Before 1.5.0, the shadcn CLI dropped the version line from core/ files, so a project updated from 1.4 shows 1.5.0 on the charts and no version on the older core files until you update them.

See what changed

  • The changelog lists every release, newest first, with new props by name.
  • Your AI agent can ask the MCP server: get_changelog with your installed version returns only what's newer, plus these steps.
  • Preview the update without writing anything:
pnpm dlx shadcn@latest add @chartslibraryui/line-chart --dry-run

It lists each file as overwrite (changed), create (new, e.g. a new core file) or skip (identical) (already up to date). To see the lines that change in one file:

pnpm dlx shadcn@latest add @chartslibraryui/line-chart --diff components/charts/line-chart.tsx

Update

Run the install again with --overwrite, on a clean git working tree so you can review the result:

pnpm dlx shadcn@latest add @chartslibraryui/line-chart @chartslibraryui/bar-chart --overwrite
  • Always take core/ with the chart (the command does it for you). A chart from one version with the core from another isn't supported.
  • "Skipped … (identical)" means that file already matches the latest version. Since 1.5.0 every file carries its version, so a file from an older release is never reported as identical.
  • To update every chart you have, list them all in one command, or use the CLI: npx chartslibraryui add <charts…> --overwrite.
  • Pro charts update the same way with your key in components.json (see Installation).

Keep your changes

Updating replaces the chart files, including any edit you made inside components/charts/. The shadcn CLI doesn't merge. Keep customisations where an update can't reach them:

  1. Props first. Most changes are props: format, highlight, labelMode, showNotes, words, colours per series. See the Common API.
  2. Theme with CSS variables (--clui-s1, --clui-grid…) in your own stylesheet, not in core/charts.css. See Theming.
  3. App-wide settings (locale, currency, translated words) go in one <ChartsProvider> in your layout. See Number formatting.
  4. Wrap, don't edit. Put your defaults in your own component, outside components/charts/:
// components/revenue-chart.tsx: yours, never overwritten
import { LineChart, type LineChartProps } from "@/components/charts/line-chart";

export function RevenueChart(props: LineChartProps) {
  return <LineChart format="currency" zero={false} showNotes="warnings" {...props} />;
}

If you did edit a chart file, run --diff first, update, then re-apply your change from the diff (git shows it too).

Sign in to ChartslibraryUI

New here? The same step creates your account.

Continue with Google
or

No password needed. Bought Pro? Use the email you paid with and your license is there. By signing in you agree to the Terms and Privacy policy.