mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 20:29:12 +02:00
3e94b9431a
Update the docs structure/content to use GitBook
640 B
640 B
Integration
Chart.js can be integrated with plain JavaScript or with different module loaders. The examples below show how to load Chart.js in different systems.
ES6 Modules
import Chart from 'chart.js'
var myChart = new Chart(ctx, {...})
Script Tag
<script src="path/to/Chartjs/dist/Chart.js"></script>
<script>
var myChart = new Chart(ctx, {...})
</script>
Common JS
var Chart = require('chart.js')
var myChart = new Chart(ctx, {...})
Require JS
require(['path/to/Chartjs/src/chartjs.js'], function(Chart){
var myChart = new Chart(ctx, {...})
})