Chart.js Installation
We can obtain the latest version of Chart.js from npm, GitHub, or by using the Chart.js CDN.
NPM
NPM Address: https://www.npmjs.com/package/chart.js
NPM Installation:
npm install chart.js
CDN
Chart.js CDN Address, Version 3.9.1:
Staticfile (China): https://cdn.staticfile.org/Chart.js/3.9.1/chart.js
Cdnjs (International): https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.9.1/chart.min.js
This series will use the domestic CDN address for testing, as shown in the example below:
Example
<script src="https://cdn.staticfile.org/Chart.js/3.9.1/chart.js"></script>
<script>
const myChart = new Chart(ctx, {...});
</script>
GitHub
GitHub Address: https://github.com/chartjs/Chart.js