Skip to content
Back to search

ztd-charts

33 animated, interactive React charts in pure SVG, with a CLI and an MCP server

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/Junhan2/ztd-charts with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/Junhan2/ztd-charts'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/junhan2--ztd-charts/badge.svg)](/listings/junhan2--ztd-charts)

HTML

<a href="/listings/junhan2--ztd-charts"><img src="/api/listings/junhan2--ztd-charts/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npm i ztd-charts

Requires React 18 or later. There are no other runtime dependencies. [Pretendard](https://github.com/orioncactus/pretendard) is the recommended font (without it, the system font is used).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 139 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <p align="center">
  2. <picture>
  3. <source media="(prefers-color-scheme: dark)" srcset="docs/readme/logo-dark.svg">
  4. <img src="docs/readme/logo-light.svg" width="56" height="56" alt="">
  5. </picture>
  6. </p>
  7. <h1 align="center">ztd charts</h1>
  8. <p align="center">
  9. Animated, accessible React charts that read like a report.<br>
  10. 47 charts in pure SVG with no runtime dependencies, and a JSON spec your AI agent can write.
  11. </p>
  12. <p align="center">
  13. <a href="https://www.npmjs.com/package/ztd-charts"><img src="https://img.shields.io/npm/v/ztd-charts?color=0B8FD8&label=npm" alt="npm version"></a>
  14. <a href="LICENSE"><img src="https://img.shields.io/npm/l/ztd-charts?color=0B8FD8" alt="MIT license"></a>
  15. <img src="https://img.shields.io/badge/runtime%20dependencies-0-0B8FD8" alt="No runtime dependencies">
  16. <a href="https://github.com/Junhan2/ztd-charts/stargazers"><img src="https://img.shields.io/github/stars/Junhan2/ztd-charts?style=flat&color=0B8FD8" alt="GitHub stars"></a>
  17. </p>
  18. <p align="center">
  19. <a href="https://charts.ztd.app/docs/docs/"><b>Docs</b></a> ·
  20. <a href="https://charts.ztd.app/docs/">Gallery</a> ·
  21. <a href="https://charts.ztd.app/docs/examples/">Example dashboards</a> ·
  22. <a href="https://charts.ztd.app/docs/playground/">Playground</a> ·
  23. <a href="README.ko.md">한국어</a>
  24. </p>
  25. <p align="center">
  26. <img src="docs/readme/hero-en.png" width="100%" alt="A dashboard built with ztd charts in the light theme: active users, visit to purchase, conversions, quarterly revenue, viewing hours and share price">
  27. </p>
  28. ## Why ztd charts
  29. - **Each card says one thing.** One item takes the accent color and the rest stay neutral, with a bold takeaway under the chart, so a reader sees the point before reading the axes.
  30. - **Motion that explains.** Charts draw in as they scroll into view, move on from where they are when the data changes, and let you drag over a range to read its change, high and low.
  31. - **Accessible by default.** Keyboard navigation, a screen reader description and data table for every chart, reduced motion, and every label at WCAG AA contrast.
  32. - **Small, with nothing else to install.** React is the only peer dependency. A chart with the shared core is about 12 to 26 kB Brotli, and very large data switches to canvas on its own.
  33. - **Ready for AI.** Every chart is also a JSON spec with a public JSON Schema, and a CLI, an MCP server and an agent skill validate it and render it to PNG, SVG or HTML.
  34. - **English and Korean.** en-US by default. `locale="ko-KR"` switches number formats (1.2만, 3.4억) and chart text to Korean.
  35. <p align="center">
  36. <img src="docs/readme/motion-en.gif" width="100%" alt="Two cards drawing in, the bar chart moving to new data from where it is, and a drag over the candlestick chart showing the change, high and low for that range">
  37. </p>
  38. ## Quick start
  39. ```bash
  40. npm i ztd-charts
  41. ```
  42. ```tsx
  43. import { ChartCard, PieChart } from "ztd-charts";
  44. const sales = [
  45. { device: "Mobile", share: 72 },
  46. { device: "Desktop", share: 23 },
  47. { device: "Tablet", share: 5 },
  48. ];
  49. export function SalesByDevice() {
  50. return (
  51. <ChartCard
  52. title="Sales by device"
  53. subtitle="Share of revenue (%)"
  54. legend={[{ label: "Mobile", color: "accent" }, { label: "Desktop", color: "ink" }, { label: "Tablet", color: "neutral" }]}
  55. takeaway="Mobile brings in most sales"
  56. >
  57. <PieChart data={sales} label="device" value="share" highlight="Mobile" />
  58. </ChartCard>
  59. );
  60. }
  61. ```
  62. The same chart as a JSON spec, which is what the CLI, the MCP server and an AI agent work with:
  63. ```tsx
  64. import { Chart } from "ztd-charts";
  65. <Chart
  66. spec={{
  67. type: "pie",
  68. data: sales,
  69. encoding: { label: "device", value: "share" },
  70. options: { highlight: "Mobile" },
  71. }}
  72. />;
  73. ```
  74. ## 47 charts
  75. <a href="https://charts.ztd.app/docs/"><img src="docs/readme/gallery-en.png" width="100%" alt="All 47 charts in the light theme, from pie and donut to the KPI table, cohort chart and horizon chart"></a>
  76. | Group | Charts |
  77. |---|---|
  78. | Proportion | Pie · Donut · Waffle · Marimekko · Segmented bar |
  79. | Hierarchy | Treemap · Sunburst · Tree |
  80. | Flow | Funnel · Sankey · Chord |
  81. | Comparison | Bar · Waterfall · Pareto · Radar · Slope · Dumbbell · Lollipop · Bar race |
  82. | Trend | Line (range band too) · Area · Streamgraph · Sparkline · Calendar heatmap · Bump · Candlestick · Skyline · Timeline · Cohort · Horizon |
  83. | Distribution | Box plot (violin too) · Beeswarm · Ridgeline · Histogram |
  84. | Relationship | Heatmap · Bubble · Scatter · Parallel coordinates · Network |
  85. | Map | Tile grid map, choropleth map, symbol map, flow map |
  86. | KPI | Gauge · Bullet · Radial bar · KPI table |
  87. Each chart has a page with a live demo, its props and copyable code in the [gallery](https://charts.ztd.app/docs/). Why each one made the cut, and what was left out, is in the [chart catalog](docs/catalog.md).
  88. ## Use it with AI
  89. ```bash
  90. # Add the MCP server to Claude Code (Cursor and Claude Desktop are in the guide)
  91. claude mcp add ztd-charts -- npx -y ztd-charts-mcp
  92. # Chart ideas and ready specs from your data, then a PNG
  93. npx ztd-charts-cli suggest sales.csv --out-dir charts
  94. npx ztd-charts-cli render donut.json --out donut.png --theme light --scale 2
  95. ```
  96. The MCP server lists charts, returns a chart's schema and example, validates a spec with suggestions for wrong fields, renders it to PNG, SVG and React code, and suggests charts from CSV, rows or a URL. The [agent skill](skills/ztd-charts/SKILL.md) walks an agent from picking a chart to a checked preview, and [llms.txt](llms.txt) gives a model the whole library in one file.
  97. ## Packages
  98. | Package | What it is |
  99. |---|---|
  100. | [`ztd-charts`](https://www.npmjs.com/package/ztd-charts) | The React charts, cards, grid, themes and data hooks, plus spec tools (`ztd-charts/spec`) and server rendering (`ztd-charts/server`) |
  101. | [`ztd-charts-cli`](https://www.npmjs.com/package/ztd-charts-cli) | List, validate, render, start a project and suggest charts from the terminal |
  102. | [`ztd-charts-mcp`](https://www.npmjs.com/package/ztd-charts-mcp) | An MCP server with five chart tools for AI agents |
  103. ## Learn more
  104. - [Guide](docs/guide.md): common props, cards and grid, theme tokens, animation and interaction, accessibility, connecting data (REST, CSV, Supabase, Google Sheets, Postgres), the JSON spec, the CLI, the MCP server and development
  105. - [Docs site](https://charts.ztd.app/docs/docs/): every chart with a live demo, five example dashboards, data connection and a playground
  106. - [QA report](docs/QA-report.md): screenshots, contrast, frame rate, a 10,000-point stress test and bundle sizes
  107. - Coming from `@junhanlee/chart-kit`? See [Migrating](docs/guide.md#migrating-from-junhanleechart-kit).
  108. ## License
  109. MIT. Every number in the examples is made up.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.