# 安装

¥Installation

# npm

npm install chart.js

# CDN

# CDNJS

Chart.js 构建文件在 CDNJS (opens new window) 上可用:

¥Chart.js built files are available on CDNJS (opens new window):

https://cdnjs.com/libraries/Chart.js (opens new window)

# jsDelivr

Chart.js 构建的文件也可以通过 jsDelivr (opens new window) 获得:

¥Chart.js built files are also available through jsDelivr (opens new window):

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

# GitHub

你可以下载最新版本的 GitHub 上的 Chart.js (opens new window)

¥You can download the latest version of Chart.js on GitHub (opens new window).

如果下载或克隆存储库,则必须 build Chart.js 才能生成 dist 文件。Chart.js 不再附带预构建的发行版本,因此强烈建议使用下载存储库的替代选项。

¥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.