CN-1139 fix:趋势图统计超过12h的数据时,x轴时间展示形式修改为:跨天时展示年月日时分,其他的保留时分形式

This commit is contained in:
hyx
2023-08-07 15:09:51 +08:00
parent 683c7d65af
commit 2b32c49692

View File

@@ -122,7 +122,7 @@ export function xAxisTimeFormatter (value) {
(date.getMinutes() < 10 ? `0${date.getMinutes()}` : date.getMinutes())
// 如果是一天的开始
if (date.getTime() === dayStart.getTime()) {
return '{day|' + dayStart.getDate() + '}'
return '{day|' + dateFormat(date, 'YYYY-MM-DD\nHH:mm') + '}'
} else if (date.getTime() === hourStart.getTime()) {
return '{hour|' + HHmm + '}'
} else {