-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbar.php
More file actions
39 lines (39 loc) · 1.31 KB
/
bar.php
File metadata and controls
39 lines (39 loc) · 1.31 KB
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
<div class="col-6">
<div class="card text-center">
<canvas id="chart1"></canvas>
<script>
var ctx = document.getElementById('chart1').getContext('2d');
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [{
label: '# of Votes',
data: [50, 35, 30, 37, 45, 30, 45],
backgroundColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)',
'rgba(0, 0, 0, 0.2)'
],
borderColor: [
'rgba(255, 99, 132, 1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(0, 159, 64, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
},
options: {}
});
</script>
<h2 class="card-header mt-5">Bar Chart</h2>
</div>
</div>