Contributing

  • Use tabs for indentation, not spaces.
  • Only change the individual files in .
  • Check that your code will pass eslint code standards, gulp lint will run this for you.
  • Keep pull requests concise, and document new functionality in the relevant file.
  • Consider whether your changes are useful for all users, or if creating a Chart.js plugin would be more appropriate.
  • Avoid breaking changes unless there is an upcoming major release, which are infrequent. We encourage people to write plugins for most new advanced features, so care a lot about backwards compatibility.

Joining the project

Active committers and contributors are invited to introduce yourself and request commit access to this project. We have a very active Slack community that you can join . If you think you can help, we'd love to have you!

Building and Testing

Chart.js uses gulp to build the library into a single JavaScript file.

This will install the local development dependencies for Chart.js, along with a CLI for the JavaScript task runner .

The following commands are now available from the repository root:

  1. > gulp build // build Chart.js in ./dist
  2. > gulp unittest // run tests from ./test/specs
  3. > gulp unittest --watch // run tests and watch for source changes
  4. > gulp lint // perform code linting (ESLint)
  5. > gulp test // perform code linting and run unit tests
  6. > gulp docs // build the documentation in ./dist/docs

Bugs and Issues

Please report these on the GitHub page - at github.com/chartjs/Chart.js. Please do not use issues for support requests. For help using Chart.js, please take a look at the tag on Stack Overflow.

Well structured, detailed bug reports are hugely valuable for the project.

  • Check the issue search to see if it has already been reported
  • Isolate the problem to a simple test case
  • Please include a demonstration of the bug on a website such as JS Bin, , or Codepen. ()
    Please provide any additional details associated with the bug, if it's browser or screen density specific, or only happens with a certain configuration or data.