-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript.js
89 lines (83 loc) · 1.73 KB
/
script.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
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
// This is for able to see chart. We are using Apex Chart. U can check the documentation of Apex Charts too..
var options = {
series: [
{
name: "Mouse",
data: [10, 0, 10, 0, 0,0,0,0,0,0,0,0],
},
{
name: "Keyboard",
data: [15, 0, 0, 10, 20,0,0,0,0,0,0,0],
},
{
name: "Desktop",
data: [10, 25, 0, 0, 0,10,0,0,0,0,0,0],
},
{
name: "Charger",
data: [0, 0, 0, 0, 0,0,15,10,20,12,0,0],
},
{
name: "Webcam",
data: [10, 0, 0, 0, 0,0,0,0,0,0,15,20],
},
],
chart: {
type: "bar",
height: 250, // make this 250
sparkline: {
enabled: false, // make this true
},
},
plotOptions: {
bar: {
horizontal: false,
columnWidth: "100%",
endingShape: "rounded",
},
},
dataLabels: {
enabled: false,
},
stroke: {
show: true,
width: 0,
colors: ["transparent"],
},
xaxis: {
categories: ["HP", "Lenovo", "Asus", "CosmicByte", "Zebronics","Dell","Xiaomi","OnePlus","Samsung","Vivo","Intel","Logitech"],
},
yaxis: {
title: {
text: "Quantity",
},
},
fill: {
opacity: 3,
},
tooltip: {
y: {
formatter: function (val) {
return+ val ;
},
},
},
};
var chart = new ApexCharts(document.querySelector("#apex1"), options);
chart.render();
// Sidebar Toggle Codes;
var sidebarOpen = true;
var sidebar = document.getElementById("sidebar");
var sidebarCloseIcon = document.getElementById("sidebarIcon");
function toggleSidebar() {
if (!sidebarOpen) {
sidebar.classList.add("sidebar_responsive");
sidebarOpen = true;
}
}
function closeSidebar() {
if (sidebarOpen) {
sidebar.classList.remove("sidebar_responsive");
sidebarOpen = false;
}
}