fix: performance page linechart tooltip time display with time unit

This commit is contained in:
Cindy Chang committed 2024-06-25 09:03:18 +08:00
1 parent 1b8c8629a9
commit 963645f071
2 files changed
+5 -126

No files matched your search

+2 -2
View File
@@ -127,8 +127,8 @@ export function simpleTimeLabel(second, fixedNumber = 0) {
const hour = 60 * 60;
const minutes = 60;
const dd = Math.floor(second / day);
const hh = Math.floor((second % day) / hour);
const mm = Math.floor((second % hour) / minutes);
const hh = Math.floor((second / hour) / day);
const mm = Math.floor((second / hour) / minutes);
if(dd > 0){
return (second / day).toFixed(fixedNumber) + "d";