hh = {
let lochh = myenergycarbon.byHHSlotDOW({ aggregate: my.Timeseries.AGG_MEAN});
let out = [];
let j = 0;
let slotLabel;
lochh.forEach((day) => {
let daylabel;
let dayarray = [];
let i = 0;
let hour = 0;
if(j == 0) daylabel = 'Monday';
if(j == 1) daylabel = 'Tuesday';
if(j == 2) daylabel = 'Wednesday';
if(j == 3) daylabel = 'Thursday';
if(j == 4) daylabel = 'Friday';
if(j == 5) daylabel = 'Saturday';
if(j == 6) daylabel = 'Sunday';
day.forEach((item) => {
if(i%2) {
slotLabel = ":30";
} else {
slotLabel = ":00";
}
dayarray.push({hh: i, label: Math.floor(i/2) + slotLabel, day: j, daylabel: daylabel, value: item});
i++;
});
out.push(dayarray);
j++;
});
return out;
}