-
Notifications
You must be signed in to change notification settings - Fork 0
/
chart.js
61 lines (59 loc) · 1.9 KB
/
chart.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
var ctx = document.getElementById('myChart').getContext('2d');
var earnings = document.getElementById('earnings').getContext('2d');
var myChart = new Chart(ctx, {
type: 'polarArea',
data: {
labels: ["Flipkart","Amazon","meesho"],
datasets: [{
label: '# of Votes',
data: [1200, 1900, 3000],
backgroundColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)'
],
// borderColor: [
// 'rgba(255, 99, 132, 1)',
// 'rgba(54, 162, 235, 1)',
// 'rgba(255, 206, 86, 1)'
// ],
borderWidth: 1
}]
},
options: {
responsive: true,
}
});
var myChart = new Chart(earnings, {
type: 'bar',
data: {
labels: ["January","February","March","April","May","June","july","August","September","October","November","December"],
datasets: [{
label: '# of Earnings',
data: [1200, 1900, 3000,2200,1800,1500,1450,1950,2308,2098,2306,1268],
backgroundColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(220, 206, 86, 1)',
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(225, 256, 86, 1)',
'rgba(255, 99, 132, 1)',
'rgba(154, 162, 235, 1)',
'rgba(75, 206, 86, 1)'
],
// borderColor: [
// 'rgba(255, 99, 132, 1)',
// 'rgba(54, 162, 235, 1)',
// 'rgba(255, 206, 86, 1)'
// ],
borderWidth: 1
}]
},
options: {
responsive: true,
}
});