changed days of the week to actual dates
parent
0dc57b2e6b
commit
9ee47146db
31
stats.html
31
stats.html
|
@ -76,28 +76,31 @@
|
||||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||||
<script>
|
<script>
|
||||||
const labels = [
|
const labels = [
|
||||||
'Sunday',
|
'day_date_1',
|
||||||
'Monday',
|
'day_date_2',
|
||||||
'Tuesday',
|
'day_date_3',
|
||||||
'Wednesday',
|
'day_date_4',
|
||||||
'Thursday',
|
'day_date_5',
|
||||||
'Friday',
|
'day_date_6',
|
||||||
'Saturday',
|
'day_date_7',
|
||||||
];
|
];
|
||||||
const data = {
|
const data = {
|
||||||
labels: labels,
|
labels: labels,
|
||||||
datasets: [{
|
datasets: [
|
||||||
|
{
|
||||||
label: 'Hours we had electricity from government',
|
label: 'Hours we had electricity from government',
|
||||||
backgroundColor: 'rgb(255, 99, 132)',
|
backgroundColor: 'rgb(255, 99, 132)',
|
||||||
borderColor: 'rgb(255, 99, 132)',
|
borderColor: 'rgb(255, 99, 132)',
|
||||||
data: [offtime_1, offtime_2, offtime_3, offtime_4, offtime_5, offtime_6, offtime_7],
|
data: [offtime_1, offtime_2, offtime_3, offtime_4, offtime_5, offtime_6, offtime_7],
|
||||||
fill: {
|
fill: true,
|
||||||
target: 'origin',
|
// fill: {
|
||||||
above: 'rgb(255, 0, 0)', // Area will be red above the origin
|
// target: 'origin',
|
||||||
below: 'rgb(0, 0, 255)' // And blue below the origin
|
// above: 'rgb(255, 0, 0)', // Area will be red above the origin
|
||||||
|
// below: 'rgb(0, 0, 255)' // And blue below the origin
|
||||||
|
//
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
}]
|
]
|
||||||
};
|
};
|
||||||
const config = {
|
const config = {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
|
|
Loading…
Reference in New Issue