1var canvas = document.getElementById('chart');
2new Chart(canvas, {
3 type: 'line',
4 data: {
5 labels: ['1', '2', '3', '4', '5'],
6 datasets: [{
7 label: 'A',
8 yAxisID: 'A',
9 data: [100, 96, 84, 76, 69]
10 }, {
11 label: 'B',
12 yAxisID: 'B',
13 data: [1, 1, 1, 1, 0]
14 }]
15 },
16 options: {
17 scales: {
18 yAxes: [{
19 id: 'A',
20 type: 'linear',
21 position: 'left',
22 }, {
23 id: 'B',
24 type: 'linear',
25 position: 'right',
26 ticks: {
27 max: 1,
28 min: 0
29 }
30 }]
31 }
32 }
33});
34