npm

npm Installation - 图2 (opens new window) npm Installation - 图4 (opens new window)

  1. npm install chart.js

CDN

CDNJS

cdnjs Installation - 图6 (opens new window)

Chart.js built files are available on CDNJS Installation - 图7 (opens new window):

https://cdnjs.com/libraries/Chart.js Installation - 图8 (opens new window)

jsDelivr

jsdelivr Installation - 图10 (opens new window) jsdelivr hits Installation - 图12 (opens new window)

Chart.js built files are also available through jsDelivr Installation - 图13 (opens new window):

https://www.jsdelivr.com/package/npm/chart.js?path=dist Installation - 图14 (opens new window)

Github

github Installation - 图16 (opens new window)

You can download the latest version of Chart.js on GitHub Installation - 图17 (opens new window).

If you download or clone the repository, you must build Chart.js to generate the dist files. Chart.js no longer comes with prebuilt release versions, so an alternative option to downloading the repo is strongly advised.