Plotcn
Copy-paste React visualization components across Recharts, D3.js, and Google Charts.
Full source code ownership. Pristine dark-mode defaults. Accessible by design.
Overview
Plotcn is an open-source React visualization collection designed for developers who demand full design control, rigorous accessibility, and pristine code quality.
Instead of installing an opaque third-party npm package that locks you into rigid styling abstractions, Plotcn distributes visualizations directly into your codebase through the shadcn Registry.
Browse component → Run CLI command → Component copied to your repo → You own every line
Three Engine Architecture
Plotcn components are built on top of three battle-tested rendering engines, chosen specifically for what they do best:
- Recharts Engine: Declarative, responsive SVG visualizations built for standard Cartesian charts — line charts, area charts, bar graphs, and scatter plots.
- D3.js Engine: Mathematical precision visualizations for specialized layouts — force-directed network graphs, Voronoi treemaps, heatmaps, and radial coordinate systems.
- Google Charts & GeoChart Engine: Mature, battle-tested standard charts and statistical choropleth geographic mapping with resilient singleton script loading, dark glassmorphic tooltips, and responsive container resizing without requiring Google Maps Platform SDKs or API keys.
Core Features
- Source Code Ownership: Visualizations are installed directly into your
@/components/chartsdirectory. You own every pixel and can tweak curves, legends, and tooltips freely. - Design System Harmony: Components inherit semantic theme tokens (
--background,--foreground,--chart-1through--chart-5,--border,--muted). - Dark Glassmorphic Aesthetics: Custom-styled tooltips with backdrop blur, subtle zinc borders, and monospace data readouts.
- Accessibility by Design: Includes
role="region",aria-label, hidden screen-reader summaries, keyboard focus rings, and respect forprefers-reduced-motion. - Zero-Lag Documentation Engine: Persistent layout, server-rendered Shiki syntax highlighting, and instant route transitions.
Getting Started
1. Initialize shadcn/ui
If you haven't already, initialize shadcn/ui in your Next.js or React project:
2. Add Visualizations
Add charts directly to your codebase using the CLI:
Quick Example: Google GeoChart
Project Structure
Development
License
Released under the MIT License [blocked].