-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
75 lines (65 loc) · 1.29 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
/*DONUT CHART*/
var options = {
series: [50, 30, 20],
chart: {
width: "100%",
height: "260px",
type: 'donut',
},
legend:{
position:"top",
align: "center"
},
labels: ['Eletronics', 'Furniture', 'Toys'],
responsive: [{
breakpoint: 480,
options: {
chart: {
width: "100%",
height: 350
},
legend: {
position: 'top',
horizontalAlign: "left",
}
}
}]
};
var chart = new ApexCharts(document.querySelector("#apex2"), options);
chart.render();
/*LINE CHART*/
var options = {
chart: {
toolbar: {
show: false
},
type: 'line',
height: "250px",
},
legend:{
position:"top"
},
series: [
{
name: "Laptops",
data: [70, 60, 90, 80, 69, 86, 77, 89, 66],
},
{
name: "Headsets",
data: [30, 20, 45, 56, 39, 58, 40, 35, 60],
},
{
name: "Monitors",
data: [85, 85, 101, 98, 87, 105, 91, 114, 94],
},
{
name: "Phones",
data: [3, 13, 36, 26, 30, 17, 21, 18, 3],
},
],
xaxis: {
categories: [2013,2014,2015,2016,2017,2018,2019,2020]
},
}
var chart = new ApexCharts(document.querySelector("#apex1"), options);
chart.render();