-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
107 lines (100 loc) · 3.69 KB
/
index.html
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="MMM-D2L.css" />
</head>
<body>
<div style="width: 500px;"><canvas id="myChart"></canvas></div>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
const ctx = document.getElementById('myChart');
function dayOfWeekAsString(day) {
return ["Sunday", "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"].indexOf(day);
}
new Chart(ctx, {
type: 'bar',
data: {
labels: [
new Date().getDay(),
new Date().getDay() - 1,
new Date().getDay() - 2,
new Date().getDay() - 3,
new Date().getDay() - 4,
new Date().getDay() - 5,
new Date().getDay() - 6],
datasets: [{
label: 'Consomation',
data: [12, 19, 3, 5, 2, 3, 7],
borderWidth: 1
}]
},
options: {
scales: {
y: {
beginAtZero: true
}
}
}
});
</script>
<div id="module_8_MMM-D2L" class="module MMM-D2L MMM-D2L">
<header class="module-header" style="display: block">Consomation</header>
<div class="module-content">
<div>
<div id="linkyId22102000007" class="title">Linky</div>
<table class="d2l-table">
<tbody>
<tr>
<td class="d2l-name" id="hc-name" colspan="2">HC</td>
<td class="d2l-value" id="HC` + moduleId + `"></td>
</tr>
<tr>
<td class="d2l-name" id="hp-name" colspan="2"><b>HP</b></td>
<td class="d2l-value" id="HP` + moduleId + `"></td>
</tr>
<tr>
<td class="d2l-name">Conso Jour</td>
<td class="d2l-value" id="conso-j-0` + moduleId + `">0 W</td>
<td class="d2l-value" id="price-j-0` + moduleId + `">0 €</td>
</tr>
<tr>
<td class="d2l-name">Conso Jour-1</td>
<td class="d2l-value" id="conso-j-1` + moduleId + `">0 W</td>
<td class="d2l-value" id="price-j-1` + moduleId + `">0 €</td>
</tr>
<tr>
<td class="d2l-name">Conso Jour-2</td>
<td class="d2l-value" id="conso-j-2` + moduleId + `">0 W</td>
<td class="d2l-value" id="price-j-2` + moduleId + `">0 €</td>
</tr>
<tr>
<td class="d2l-name">Conso Jour-3</td>
<td class="d2l-value" id="conso-j-3` + moduleId + `">0 W</td>
<td class="d2l-value" id="price-j-3` + moduleId + `">0 €</td>
</tr>
<tr>
<td class="d2l-name">Conso Jour-4</td>
<td class="d2l-value" id="conso-j-4` + moduleId + `">0 W</td>
<td class="d2l-value" id="price-j-4` + moduleId + `">0 €</td>
</tr>
<tr>
<td class="d2l-name">Conso Jour-5</td>
<td class="d2l-value" id="conso-j-5` + moduleId + `">0 W</td>
<td class="d2l-value" id="price-j-5` + moduleId + `">0 €</td>
</tr>
<tr>
<td class="d2l-name">Conso Jour-6</td>
<td class="d2l-value" id="conso-j-6` + moduleId + `">0 W</td>
<td class="d2l-value" id="price-j-6` + moduleId + `">0 €</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>