Chart.js draws animated, customizable charts in the browser using JavaScript and the canvas element, aimed at designers and developers.
Overview
Chart.js is a JavaScript charting library for building graphs on web pages with HTML5 canvas. It targets the modern web and emphasizes flexible configuration for designers and developers who need charts inside their own sites or applications.
The library ships with multiple chart types that can be animated and customized, and it renders through canvas for performance across current browsers. Charts can redraw when the window resizes so layouts stay proportional on different screen sizes.
Recent releases add optional plugins such as default color palettes, tree-shaking of bundle size by registering only needed components, subtitle support, per-segment line styling, configurable animations, mixed bar and line charts, and varied axis types including date, logarithmic, and custom scales. Documentation covers getting started, configuration, chart and axis options, and developer topics.
Chart.js is community maintained and distributed under the MIT license, with samples and ecosystem links for adoption in web projects.
Key features
- Multiple animated chart types
- HTML5 canvas rendering
- Responsive resize handling
- Mix bar and line datasets
- Date, log, and custom axes
- Tree-shakable bundle registration
- Built-in colors plugin option
- Per-element animation control
Use cases
- Dashboards in web applications
- Embedding charts in marketing pages
- Visualizing time series in the browser
- Mixed dataset comparison charts
- Large datasets with decimation plugin