Skip to content

Commit a47b990

Browse files
committed
Fix time chart by hours on dashboard
1 parent 82dca11 commit a47b990

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/TimeIntervalChart.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,19 @@ function convertTimIntervalToObject(
7272
const arr = [];
7373
const firstPart1 = array[0];
7474
const firstPart2 = `${time1[0]}:59:59`;
75+
const hourForFirstPart = firstPart1.split(':');
7576
arr.push({
76-
hour: Number(firstPart1[0]),
77+
hour: Number(hourForFirstPart[0]),
7778
summary:
7879
convertStringTimeIntervalToSeconds(firstPart2) -
7980
convertStringTimeIntervalToSeconds(firstPart1),
8081
domain: domain,
8182
});
8283
const secondPart1 = `${time2[0]}:00:00`;
8384
const secondPart2 = `${time2[0]}:${time2[1]}:${time2[2]}`;
85+
const hourForsecondPart = secondPart1.split(':');
8486
arr.push({
85-
hour: Number(secondPart1[0]),
87+
hour: Number(hourForsecondPart[0]),
8688
summary:
8789
convertStringTimeIntervalToSeconds(secondPart2) -
8890
convertStringTimeIntervalToSeconds(secondPart1),

0 commit comments

Comments
 (0)