-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.js
More file actions
36 lines (33 loc) · 818 Bytes
/
profile.js
File metadata and controls
36 lines (33 loc) · 818 Bytes
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
const ctx = document.getElementById('myChart');
new Chart(ctx, {
type: 'bar',
data: {
labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
datasets: [
{
label: '# of Votes',
data: [12, 19, 3, 5, 2, 3],
borderWidth: 1,
},
],
},
options: {
scales: {
y: {
beginAtZero: true,
},
},
},
});
const componenets = document.querySelectorAll('.userDetailComponent');
componenets.forEach((curr) => {
curr.addEventListener('mouseenter', () => {
curr.setAttribute('class', 'userDetailComponentHover');
});
curr.addEventListener('mouseleave', () => {
curr.setAttribute('class', 'userDetailComponent');
});
curr.addEventListener('click', () => {
curr.setAttribute('class', 'userDetailComponentHover');
});
});