1- /* eslint-disable object-curly-newline */
21/* global Chart */
32
43/**
87 * --------------------------------------------------------------------------
98 */
109
11- /* eslint-disable no-magic-numbers */
1210// random Numbers
1311const random = ( ) => Math . round ( Math . random ( ) * 100 )
1412
1513// eslint-disable-next-line no-unused-vars
1614const lineChart = new Chart ( document . getElementById ( 'canvas-1' ) , {
1715 type : 'line' ,
1816 data : {
19- labels : [ 'January' , 'February' , 'March' , 'April' , 'May' , 'June' , 'July' ] ,
20- datasets : [
17+ labels : [ 'January' , 'February' , 'March' , 'April' , 'May' , 'June' , 'July' ] ,
18+ datasets : [
2119 {
2220 label : 'My First dataset' ,
23- backgroundColor : 'rgba(220, 220, 220, 0.2)' ,
24- borderColor : 'rgba(220, 220, 220, 1)' ,
25- pointBackgroundColor : 'rgba(220, 220, 220, 1)' ,
26- pointBorderColor : '#fff' ,
27- data : [ random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) ]
21+ backgroundColor : 'rgba(220, 220, 220, 0.2)' ,
22+ borderColor : 'rgba(220, 220, 220, 1)' ,
23+ pointBackgroundColor : 'rgba(220, 220, 220, 1)' ,
24+ pointBorderColor : '#fff' ,
25+ data : [ random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) ]
2826 } ,
2927 {
3028 label : 'My Second dataset' ,
31- backgroundColor : 'rgba(151, 187, 205, 0.2)' ,
32- borderColor : 'rgba(151, 187, 205, 1)' ,
33- pointBackgroundColor : 'rgba(151, 187, 205, 1)' ,
34- pointBorderColor : '#fff' ,
35- data : [ random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) ]
29+ backgroundColor : 'rgba(151, 187, 205, 0.2)' ,
30+ borderColor : 'rgba(151, 187, 205, 1)' ,
31+ pointBackgroundColor : 'rgba(151, 187, 205, 1)' ,
32+ pointBorderColor : '#fff' ,
33+ data : [ random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) ]
3634 }
3735 ]
3836 } ,
@@ -45,21 +43,21 @@ const lineChart = new Chart(document.getElementById('canvas-1'), {
4543const barChart = new Chart ( document . getElementById ( 'canvas-2' ) , {
4644 type : 'bar' ,
4745 data : {
48- labels : [ 'January' , 'February' , 'March' , 'April' , 'May' , 'June' , 'July' ] ,
49- datasets : [
46+ labels : [ 'January' , 'February' , 'March' , 'April' , 'May' , 'June' , 'July' ] ,
47+ datasets : [
5048 {
51- backgroundColor : 'rgba(220, 220, 220, 0.5)' ,
52- borderColor : 'rgba(220, 220, 220, 0.8)' ,
49+ backgroundColor : 'rgba(220, 220, 220, 0.5)' ,
50+ borderColor : 'rgba(220, 220, 220, 0.8)' ,
5351 highlightFill : 'rgba(220, 220, 220, 0.75)' ,
5452 highlightStroke : 'rgba(220, 220, 220, 1)' ,
55- data : [ random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) ]
53+ data : [ random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) ]
5654 } ,
5755 {
58- backgroundColor : 'rgba(151, 187, 205, 0.5)' ,
59- borderColor : 'rgba(151, 187, 205, 0.8)' ,
60- highlightFill : 'rgba(151, 187, 205, 0.75)' ,
61- highlightStroke : 'rgba(151, 187, 205, 1)' ,
62- data : [ random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) ]
56+ backgroundColor : 'rgba(151, 187, 205, 0.5)' ,
57+ borderColor : 'rgba(151, 187, 205, 0.8)' ,
58+ highlightFill : 'rgba(151, 187, 205, 0.75)' ,
59+ highlightStroke : 'rgba(151, 187, 205, 1)' ,
60+ data : [ random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) , random ( ) ]
6361 }
6462 ]
6563 } ,
0 commit comments