Library / SDK
chartist-js/chartist avatar
chartist-js/chartist

Chartist 2: SVG charts styled with CSS, and a function API that replaces the 1.x classes

Simple responsive charts

13,466 stars2,461 forksTypeScriptMIT

At a glance

What is it?
Chartist draws responsive SVG charts that you style with plain CSS, with no dependencies and no required build step. Version 2 moves from chart classes to functions while keeping 1.x code running, but the class API is scheduled to disappear in 3.0 and most community wrappers still target older versions.
Who is it for?
Chartist suits developers who want small, dependency-free SVG line and bar charts that they style with their own CSS, including pages without a bundler and server-rendered output for PDFs or email. It is a poor fit if you depend on a framework wrapper that only supports Chartist 0.x, or if you want a theme engine rather than writing CSS.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • chartist-js/chartist13,466 ★ · +76
Star history
Repository2026-09-222026-11-15
chartist-js/chartist13.4k13.5k

76 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Charts are SVG and the styling is your CSS

Chartist draws charts as plain SVG with predictable class names and CSS custom properties for colors, lines and labels. There is no theme engine: if you want a different look, you write CSS against those classes and properties. For teams with an existing design system this is the attraction, because charts pick up the same stylesheet as everything else. For teams that want a set of ready-made themes to switch between, it means more work up front.

Because the output is real SVG with real text labels, a chart renders anywhere SVG does, including on a server, which makes it usable for PDFs, email and images. The library is written in TypeScript, has no dependencies, and you ship only the functions you import.

One function call per chart

Version 2 is built around chart functions. Install from npm, import the function and the stylesheet, and point it at a container:

sh
npm install chartist
ts
import { lineChart } from 'chartist';
import 'chartist/styles.css';

lineChart('#chart', {
  labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
  series: [
    [12, 9, 7, 8, 5],
    [2, 1, 3.5, 7, 3]
  ]
});
html
<div id="chart" class="ct-golden-section"></div>

The container carries the ct-golden-section class, and the data is plain arrays: one array of labels and an array of series arrays, here two of them. The same call shape works for the other chart functions you import.

Running from a CDN without a bundler

Chartist is a native ES module, so a page with no build step can load it straight from jsDelivr:

html
<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/chartist@2/dist/index.min.css"
/>
<div id="chart" class="ct-golden-section"></div>
<script type="module">
  import { lineChart } from 'https://cdn.jsdelivr.net/npm/chartist@2/dist/index.min.js';

  lineChart('#chart', { series: [[1, 3, 2, 5]] });
</script>

Both URLs name only the major version, chartist@2, not an exact release. Given how quickly the 2.x line has moved, decide whether you want that, and test the page again after each minor release if you keep it.

Responsive by media query or by container

Responsiveness works two ways. Options can change with media queries, which ties chart settings to the viewport, or with the size of the chart's own container, which suits charts placed in sidebars and cards whose width does not follow the window. Charts can also be composed: bars and lines in one chart, on as many axes as you need.

Every element passes through an open pipeline you can hook into, and that pipeline is how plugins extend Chartist. The community's plugins keep working on version 2, and a plugin index is published at chartist.dev/plugins.

The 1.x classes keep working until 3.0 removes them

Code written for Chartist 1 keeps working on version 2: the chart classes draw what they drew before. 1.x events and plugins run through chartist/compat. But the classes are deprecated, and 3.0 removes them from the chartist package.

For an existing project the consequence is a deadline rather than an emergency. Upgrading to 2.x costs little today, but staying on the classes means the move to 3.0 forces a rewrite of every chart call to the function API. A Coming from 1.x guide on chartist.dev covers what changed and how to move to the functions, and the 1.x docs remain at chartist.dev/v1/. The cheapest path is to migrate charts to functions as you touch them during the 2.x line.

Most community wrappers stop at Chartist 0.x

Chartist argues it needs no wrapper, since a chart is a container plus a function call, and chartist.dev has recipes for React, Vue, Angular and Svelte, including server rendering. The community wrappers tell a different story about version support. react-chartist and ng-chartist are built for Chartist 1.x. vue-chartist, node-chartist, ember-cli-chartist, ChartistJSF, v-chartist, the R htmlwidget, the Meteor package, the TablePress WordPress extension, the Blazor wrapper, ngx-chartist and chartist-rails are all built for Chartist 0.x.

Wrappers built for 1.x do run on v2, but they need an npm overrides entry until they allow chartist@2. Wrappers built for 0.x get no such statement. If your stack depends on one of them, you either stay on an old Chartist or drop the wrapper and call the functions directly.

Three 2.x releases in four days

The 2.x line moved fast: v2.0.0 on October 16, 2026, v2.1.0 on October 18, and v2.2.0 on October 20. The last push was on October 31, 2026, so the project is under active development, and Cube sponsors its maintenance. Read CHANGELOG.md before bumping versions during this period.

The repository is an Nx and pnpm monorepo holding the library in packages/chartist, the chartist.dev docs site in apps/docs, the examples and a playground. Working on it starts with:

sh
pnpm install

Tasks then run through Nx, for example pnpm nx test chartist or pnpm nx dev docs. GitHub reports the license as MIT, and the repository ships both LICENSE-MIT and LICENSE-WTFPL: Chartist is dual-licensed under either, at your choice.

Editorial conclusion

Chartist suits developers who want small, dependency-free SVG line and bar charts that they style with their own CSS, including pages without a bundler and server-rendered output for PDFs or email. It is a poor fit if you depend on a framework wrapper that only supports Chartist 0.x, or if you want a theme engine rather than writing CSS. Before upgrading an existing 1.x project, plan the move from chart classes to functions, since 3.0 removes the classes from the main package.

Frequently asked questions

What is Chartist the JavaScript library?

Chartist is a TypeScript library for simple, responsive charts drawn in SVG and styled with CSS. It has no dependencies and works as a native ES module without a build step.

Does Chartist 1.x code work on Chartist 2?

Yes. The 1.x chart classes still draw what they drew before, and 1.x events and plugins work with chartist/compat. The classes are deprecated and 3.0 removes them from the chartist package.

Can I use react-chartist with Chartist 2?

react-chartist is built for Chartist 1.x, and wrappers built for 1.x run on v2 with an npm overrides entry until they allow chartist@2.

What license does Chartist use?

Chartist is dual-licensed under MIT or WTFPL, at your choice.

Official sources

  1. chartist-js/chartist on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/chartist-js-chartist.svg)](https://hysenlabs.com/projects/chartist-js-chartist)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/chartist-js-chartist.svg)](https://hysenlabs.com/projects/chartist-js-chartist)

Was this useful?