Dev Resources
Chart.js favicon

Chart.js

Library/Programming

Simple, clean and engaging HTML5 based JavaScript charts. Chart.js is an easy way to include animated, interactive graphs on your website for free.

Chart.js's website screenshot

About Chart.js

Chart.js is an open-source JavaScript library for creating charts on web pages using the HTML5 Canvas element. It supports 8 chart types, including mixed chart types such as combined bar and line charts within a single visualization. Charts are responsive, automatically redrawing on window resize, and support configurable animations for data changes, color updates, and dataset additions.

The library offers a colors plugin providing a default palette of Chart.js brand colors with zero configuration, and supports tree-shaking so bundle size can be reduced by registering only the components needed. Additional features include a subtitle plugin, configurable line segment styling, and stacked/weighted scale layouts. It supports plotting on date-time, logarithmic, and custom axis types, and includes a decimation plugin for handling large datasets (demonstrated with 1 million data points).

Chart.js is community maintained and intended for developers building charting and data visualization functionality into websites and web applications.

Key features

  • 8 built-in chart types including bar, line, and mixed chart types
  • HTML5 Canvas rendering for strong performance across modern browsers
  • Responsive charts that redraw automatically on window resize
  • Configurable per-element animations and transitions
  • Tree-shaking support to reduce JavaScript bundle size by registering only needed components
  • Built-in colors plugin with a default Chart.js brand palette

Frequently asked questions

Is Chart.js free to use?

Yes, Chart.js is an open source, community-maintained project.

What browsers does Chart.js support?

It renders via HTML5 Canvas with great performance across all modern browsers, including IE11+.

Can I mix different chart types in one chart?

Yes, Chart.js supports mixing chart types such as bar and line to visually distinguish datasets.

Does Chart.js support responsive layouts?

Yes, charts automatically redraw on window resize for perfect scale granularity.

Can I reduce the bundle size when using Chart.js?

Yes, tree-shaking is supported so you can register only the components you need to reduce bundle size by dozens of kilobytes.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product