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>
|
||||
const labels = [
|
||||
'Sunday',
|
||||
'Monday',
|
||||
'Tuesday',
|
||||
'Wednesday',
|
||||
'Thursday',
|
||||
'Friday',
|
||||
'Saturday',
|
||||
'day_date_1',
|
||||
'day_date_2',
|
||||
'day_date_3',
|
||||
'day_date_4',
|
||||
'day_date_5',
|
||||
'day_date_6',
|
||||
'day_date_7',
|
||||
];
|
||||
const data = {
|
||||
labels: labels,
|
||||
datasets: [{
|
||||
datasets: [
|
||||
{
|
||||
label: 'Hours we had electricity from government',
|
||||
backgroundColor: 'rgb(255, 99, 132)',
|
||||
borderColor: 'rgb(255, 99, 132)',
|
||||
data: [offtime_1, offtime_2, offtime_3, offtime_4, offtime_5, offtime_6, offtime_7],
|
||||
fill: {
|
||||
target: 'origin',
|
||||
above: 'rgb(255, 0, 0)', // Area will be red above the origin
|
||||
below: 'rgb(0, 0, 255)' // And blue below the origin
|
||||
|
||||
fill: true,
|
||||
// fill: {
|
||||
// target: '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 = {
|
||||
type: 'line',
|
||||
|
|
Loading…
Reference in New Issue