Simple HTML5 Charts using the <canvas> tag
1. Initialize the plugin by referencing the necessary files:
<script src="/path/to/chart.js"></script>
2. The component will bind to any existing DOM element.
<div class="chartjs">
<canvas id="myChart" width="400" height="400"></canvas>
</div>
3. Basic usage may look something like this.
var myChart = new Chart({...})
// Using CommonJS
var Chart = require('src/chart.js')
var myChart = new Chart({...})
// ES6
import Chart from 'src/chart.js'
let myChart = new Chart({...})
// Using requirejs
require(['path/to/Chartjs'], function(Chart){
var myChart = new Chart({...})
})
Refer following links for detailed documentation, configuration options, methods and examples: