-
Notifications
You must be signed in to change notification settings - Fork 3
/
reportsGeneration.html
208 lines (198 loc) · 5.53 KB
/
reportsGeneration.html
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<title>My Chart.js Chart</title>
</head>
<body>
<button class="btn" id="btn" onclick="chart1();">Upcomming Events</button>
<button class="btn" id="btn2" onclick="chart2();">Events venues</button>
<button class="btn" id="btn3" onclick="chart3();">Tickets sold</button>
<button class="btn" id="btn4" onclick="chart4();">Venues Location</button>
<div class="container">
<canvas id="cities" width="500" height="200"></canvas>
<canvas id="venues" width="500" height="200"></canvas>
<canvas id="tickets" width="500" height="200"></canvas>
<canvas id="venuesLocation" width="500" height="200"></canvas>
</div>
<script>
var cities = document.getElementById('cities');
var venues = document.getElementById('venues');
var tickets = document.getElementById('tickets');
var venuesLocation = document.getElementById('venuesLocation');
function chart1(){
var myChart = new Chart(cities, {
type:'bar', // bar, horizontalBar, pie, line, doughnut, radar, polarArea
data:{
labels:['Buffalo', 'Indio', 'Oakland', 'El Paso', 'Saint Paul', 'Los Angeles', 'Memphis', 'Raleigh',
'California', 'New Jersey'],
datasets:[{
label:'Number of upcomming events',
data:[
27,
2,
82,
23,
15,
46,
2,
19,
20,
9
],
//backgroundColor:'green',
backgroundColor:[
'rgba(255, 99, 132, 0.6)',
'rgba(54, 162, 235, 0.6)',
'rgba(255, 206, 86, 0.6)',
'rgba(75, 192, 192, 0.6)',
'rgba(153, 102, 255, 0.6)',
'rgba(255, 159, 64, 0.6)',
'rgba(255, 99, 132, 0.6)'
],
borderWidth:1,
borderColor:'#777',
hoverBorderWidth:3,
hoverBorderColor:'#000'
}]
},
options:{
title:{
display:true,
text:'Upcomming Events in Multiple Cities',
fontSize:25
}}
});
}
function chart2(){
var myChart1 = new Chart(venues, {
type:'bar', // bar, horizontalBar, pie, line, doughnut, radar, polarArea
data:{
labels:['Empire Polo Field', 'KeyBank Center', 'RingCentral Coliseum', 'Empire Polo Field', 'Sun Bowl Stadium',
'Xcel Energy Center', 'STAPLES Center', 'FedExForum'],
datasets:[{
label:'Number of events in multiple venues',
data:[
2,
31,
84,
22,
2,
77,
68,
28,
20,
9
],
//backgroundColor:'green',
backgroundColor:[
'rgba(255, 99, 132, 0.6)',
'rgba(54, 162, 235, 0.6)',
'rgba(255, 206, 86, 0.6)',
'rgba(75, 192, 192, 0.6)',
'rgba(153, 102, 255, 0.6)',
'rgba(255, 159, 64, 0.6)',
'rgba(255, 99, 132, 0.6)'
],
borderWidth:1,
borderColor:'#777',
hoverBorderWidth:3,
hoverBorderColor:'#000'
}]
},
options:{
title:{
display:true,
text:'Upcomming Events in Multiple Venues',
fontSize:25
}}
});
}
function chart3(){
var myChart = new Chart(tickets, {
type:'bar', // bar, horizontalBar, pie, line, doughnut, radar, polarArea
data:{
labels:['America/New_York', 'America/Los_Angeles', 'America/Denver', 'America/Chicago', 'America/Los_Angeles', 'America/Chicago',
],
datasets:[{
label:'Number of total tickets solds in cities',
data:[
24,
92,
82,
12,
9,
15
],
//backgroundColor:'green',
backgroundColor:[
'rgba(255, 99, 132, 0.6)',
'rgba(54, 162, 235, 0.6)',
'rgba(255, 206, 86, 0.6)',
'rgba(75, 192, 192, 0.6)',
'rgba(153, 102, 255, 0.6)',
'rgba(255, 159, 64, 0.6)',
'rgba(255, 99, 132, 0.6)'
],
borderWidth:1,
borderColor:'#777',
hoverBorderWidth:3,
hoverBorderColor:'#000'
}]
},
options:{
title:{
display:true,
text:'Sold Tickets in different cities',
fontSize:25
}}
});
}
function chart4(){
var myChart = new Chart(venuesLocation, {
type:'bar', // bar, horizontalBar, pie, line, doughnut, radar, polarArea
data:{
labels:['One Seymour H. Knox III Plaza', '81800 Avenue 51', '7000 Coliseum Way', '2501 Sun Bowl Drive - UTEP Campus', '199 Kellogg Blvd', '1111 S. Figueroa St',
'191 Beale Street', ],
datasets:[{
label:'Number Tickets solds in different venues',
data:[
31,
60,
55,
18,
35,
15
],
//backgroundColor:'green',
backgroundColor:[
'rgba(255, 99, 132, 0.6)',
'rgba(54, 162, 235, 0.6)',
'rgba(255, 206, 86, 0.6)',
'rgba(75, 192, 192, 0.6)',
'rgba(153, 102, 255, 0.6)',
'rgba(255, 159, 64, 0.6)',
'rgba(255, 99, 132, 0.6)'
],
borderWidth:1,
borderColor:'#777',
hoverBorderWidth:3,
hoverBorderColor:'#000'
}]
},
options:{
title:{
display:true,
text:'Tickets solds comparison regarding venues',
fontSize:25
}}
});
}
</script>
</body>
</html>