Chartist v2
chartist.dev- Category
- Developer Tools
- Rank
- No. 806Tools index
- Pricing
- Open Source
- Type
- TOOL
- Use case
- Design & Media
- GitHub
- 13.5k stars
- Latest release
- v2.4.0
- Date
About
Chartist is a TypeScript charting library that draws responsive charts as SVG and leaves styling to CSS classes and custom properties. Version 2 adds a functional API, composed charts that mix bars and lines on separate axes, and server-side rendering for outputs such as PDFs, email and images. Existing 1.x code keeps working, so projects can migrate gradually.
What it does
A small charting library for the web. You hand a function a container and your numbers, and it draws line, bar or pie charts as plain SVG. Every visual choice, from series colors to grid lines, is a CSS variable you override in your own stylesheet. The same layout step can produce markup on a server with no browser, so a chart can go into a PDF or an email. A sister package draws the same charts as text in a terminal.
Why it's ranked here
A charting library with history back to 2014 that rebuilt itself without breaking its users. The old chart classes now sit on top of the new functions and are checked by visual tests against the last 1.x release. Dual MIT or WTFPL licensing, written in TypeScript, and each entry point has a size budget the build enforces. Reference lines, shaded bands and least-squares trend lines moved into the core instead of third-party plugins. The project writes down its standing decisions with reasons, which makes its direction easy to predict. Cube sponsors its maintenance.
What's good
Styling stays where designers expect it. Output carries no inline style attributes, so a stylesheet always wins, and default colors follow the page's declared color scheme rather than the operating system, so a light page stays light. It runs without a build step as a native ES module from a CDN, and also ships CommonJS and a legacy global build. Server rendering, live in-place updates and the 1.x compatibility layer are separate opt-in entry points, so code you do not import is not shipped. Third-party renderers get the same public building blocks the terminal package uses.
Tradeoffs
Version 2 is very new and still moving. The first minor release after 2.0 already moved the render-to-markup function to the server entry point, a breaking change for anyone importing it from the root. The live update renderer is marked experimental and may change within 2.x. The 1.x classes are deprecated and leave the main package in 3.0. Most listed community wrappers were built for 0.x, and the 1.x ones need an npm override to accept version 2. Official framework support is planned as a web component that does not exist yet, and the project says some future add-on packages will be commercial.
How to use it well
Pick it when charts must match a design system you already control through CSS, or when the same chart has to render in a browser, on a server for a PDF or email, and in a terminal. Start with the functional API, not the classes, since new features land only there. Pin the minor version while v2 settles, and keep live updates out of critical paths until that API is declared stable. It covers line, bar, pie and composed bar and line charts; it is not a data exploration or dashboard tool, and fits beyond those chart types need custom layers.
Technical notes+
packages/chartist/src/index.ts re-exports the 1.x surface (core, event, charts, axes, svg, utils, Interpolation) alongside the v2 modules (scene, pipeline, render, chart, scales, layers, presets, responsive), which is how docs/decisions.md's promise that no 1.x export is removed in 2.x is met. packages/chartist/src/charts/index.ts still exports BaseChart, LineChart, BarChart and PieChart. packages/chartist/src/render/index.ts exposes domRenderer, seriesColors, estimateText and textAscent, the shared public API that packages/terminal/src/index.ts builds on (renderToTerminal, renderToHtml, detectColorMode). packages/chartist/src/live/index.ts tags liveDomRenderer, diffScenes and smilAnimations @experimental. packages/chartist/src/server/index.ts re-exports toScene and imports only the package root so its builds do not bundle a second core. CHANGELOG.md records renderToString moving to chartist/server as a breaking change in 2.1.0. The root package.json is a private Nx and pnpm workspace manifest, so the library's own runtime dependency list was not in the files read; the zero-dependency claim comes from README.md.
Observed
- License
- Dual MIT or WTFPL, at the user's choice
- Language
- TypeScript
- Install
- npm install chartist, or a native ES module from a CDN with no bundler
- Build formats
- Bundler ESM, minified browser ESM, UMD global, CommonJS, with type declarations for both module systems
- Entry points
- chartist, plus opt-in chartist/compat, chartist/live and chartist/server
- Interfaces
- Library API; terminal renderer package with a ct-cli command
- Experimental surface
- Live update renderer is marked experimental in packages/chartist/src/live/index.ts
- 1.x compatibility
- 1.x chart classes kept as deprecated wrappers, removal from the main package planned for 3.0
- Repository layout
- Nx and pnpm monorepo holding the library, the terminal package and the docs site
Read from README.md, package.json, LICENSE-MIT, CHANGELOG.md, docs/decisions.md, docs/typescript.md, packages/chartist/src/index.ts, packages/chartist/src/charts/index.ts, packages/chartist/src/core/index.ts, packages/chartist/src/render/index.ts, packages/chartist/src/server/index.ts, packages/chartist/src/live/index.ts, packages/terminal/src/index.ts.
Similar tools
Tags
Tech Stack
Media

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.