changed days of the week to actual dates

master
Adriel Sand 2021-10-01 13:01:33 +03:00
parent 0dc57b2e6b
commit 9ee47146db
1 changed files with 18 additions and 15 deletions

View File

@ -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',