-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchart.js
41 lines (35 loc) · 804 Bytes
/
chart.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
const ctx = document.getElementById("barchart").getContext("2d");
const barchart = new Chart(ctx, {
type: "bar",
data: {
labels: ["2024", "2025", "2030", "2040"],
datasets: [
{
label: "Global EV Charging Stations powered by Renewable Energy",
data: [25, 30, 50, 70],
backgroundColor:
[
"rgba(0, 150, 126, 0.5)",
"rgba(0, 150, 126, 0.5)",
"rgba(0, 150, 126, 0.5)",
"rgba(0, 150, 126, 0.5)",
],
borderColor:
[
"rgba(0, 88, 73, 2)",
"rgba(0, 88, 73, 2)",
"rgba(0, 88, 73, 2)",
"rgba(0, 88, 73, 2)",
],
borderWidth: 1,
},
],
},
options: {
scales: {
y: {
beginAtZero: true,
},
},
},
});