Skip to content

Chartist

A small JavaScript library that draws simple, responsive SVG charts styled with CSS.

Stars
13.5k
Forks
2.5k
Licence
MIT
Language
TypeScript
Last update
5 days ago
Type
Library

What it is

Chartist is a JavaScript library for drawing charts on web pages. It renders charts as SVG, so they scale to fit their container, and you style them with ordinary CSS. It is aimed at people who want a lightweight, readable charting option without a large framework.

  • Show a weekly line chart of sales or traffic on a web page
  • Combine bars and lines in a single chart across multiple axes
  • Render a chart on a server as SVG for inclusion in a PDF or image
  • Build a responsive chart whose options change with media queries

Great for

  • Web developers adding simple line, bar or pie charts to a site
  • Teams that want to style charts with plain CSS
  • Projects that prefer no build step, using a native ES module from a CDN
  • Developers who want charts rendered on a server as SVG for PDFs or email

Not ideal for

  • People who need many advanced chart types or built-in interactivity, since the README focuses on core simple charts
  • Users of Chartist 0.x or 1.x wrappers who need a fully supported path, since the README notes some wrappers still target older versions
  • Beginners with no web development experience, since the examples assume HTML and JavaScript familiarity
Step-by-step guide: how to use ChartistInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    Install from npm

    npm install chartist
  2. 2

    Run it

    • Install the package with npm install chartist.
    • Add a container element with an id and the class ct-golden-section.
    • Import lineChart and the stylesheet, then call lineChart with a selector and your data series.
    • Open the page in a browser to see the chart.
  3. 3

    Get the most out of it

    • Use the responsive options (media queries or container-based) to adapt charts to different screen sizes.
    • Customize colors, lines and labels through the CSS custom properties described in the README.
    • Use the plugin system and the community plugins listed on the docs site to extend charts.
    • Use the server rendering approach to produce SVG output for PDFs, email or images.

Downloads

Strengths

  • Charts are plain SVG styled with CSS, which is easy to customize
  • Written in TypeScript with no dependencies, and you ship only what you import
  • Works without a bundler as a native ES module

Trade-offs

  • The README says 1.x classes are deprecated and will be removed in 3.0, so migration may be needed for older code
  • Some community wrappers were built for older Chartist versions and may need workarounds
  • The README does not list every chart type or feature, so check the docs for specifics

How it compares

ProjectStarsTypeLevelUpdatedBest for
chartist (this)13.5kLibrarybeginner5 days agoWeb developers adding simple line, bar or pie charts to a site
Chart.js67.8kLibraryintermediate14 days agoWeb developers adding standard charts such as line or bar charts to a site
recharts27.7kLibrarybeginner4 days agoReact developers who need standard charts such as line, bar or similar graphs in a web app
anime74.2kLibrarybeginner3 months agoFront-end developers adding motion to websites or web apps
feather26kLibrarybeginner1.7 years agoWeb developers who want a clean set of line icons without designing their own
rough21.3kLibraryintermediate2.3 years agoWeb developers who want a casual, hand-drawn look for diagrams or illustrations

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.