title | anchor |
---|---|
Notes |
notes |
Version 2 has a completely different API than earlier versions.
Most earlier version options have current equivalents or are the same.
Please use the documentation that is available on chartjs.org for the current version of Chart.js.
Please note - documentation for previous versions are available on the GitHub repo.
Chart.js offers support for all browsers where canvas is supported.
Browser support for the canvas element is available in all modern & major mobile browsers (http://caniuse.com/#feat=canvas).
Thanks to BrowserStack for allowing our team to test on thousands of browsers.
Please report these on the GitHub page - at github.com/chartjs/Chart.js. If you could include a link to a simple jsbin or similar to demonstrate the issue, that'd be really helpful.
New contributions to the library are welcome, but we ask that you please follow these guidelines:
- Use tabs for indentation, not spaces.
- Only change the individual files in
/src
. - Check that your code will pass
eslint
code standards,gulp lint
will run this for you. - Check that your code will pass tests,
gulp test
will run tests for you. - Keep pull requests concise, and document new functionality in the relevant
.md
file. - Consider whether your changes are useful for all users, or if creating a Chart.js plugin would be more appropriate.
Chart.js is open source and available under the MIT license.
Library Features
Feature | Chart.js | D3 | HighCharts | Chartist |
---|---|---|---|---|
Completely Free | ✓ | ✓ | ✓ | |
Canvas | ✓ | |||
SVG | ✓ | ✓ | ✓ | |
Built-in Charts | ✓ | ✓ | ✓ | |
8+ Chart Types | ✓ | ✓ | ✓ | |
Extendable to Custom Charts | ✓ | ✓ | ||
Supports Modern Browsers | ✓ | ✓ | ✓ | ✓ |
Extensive Documentation | ✓ | ✓ | ✓ | ✓ |
Open Source | ✓ | ✓ | ✓ | ✓ |
Built in Chart Types
Type | Chart.js | HighCharts | Chartist |
---|---|---|---|
Combined Types | ✓ | ✓ | |
Line | ✓ | ✓ | ✓ |
Bar | ✓ | ✓ | ✓ |
Horizontal Bar | ✓ | ✓ | ✓ |
Pie/Doughnut | ✓ | ✓ | ✓ |
Polar Area | ✓ | ✓ | |
Radar | ✓ | ||
Scatter | ✓ | ✓ | ✓ |
Bubble | ✓ | ||
Gauges | ✓ | ||
Maps (Heat/Tree/etc.) | ✓ |
There are many plugins that add additional functionality to Chart.js. Some particularly notable ones are listed here. In addition, many plugins can be found on the Chart.js GitHub organization.
- Chart.Zoom.js - Enable zooming and panning on charts
- Chart.Annotation.js - Draw lines and boxes on chart area
- Chart.BarFunnel.js - Adds a bar funnel chart type
- Chart.Deferred.js - Defer initial chart update until chart scrolls into viewport
- Chart.Smith.js - Adds a smith chart type
- Chart.LinearGauge.js - Adds a linear gauge chart type
There are many extensions which are available for use with popular frameworks. Some particularly notable ones are listed here.