Use short codes for ms and μs

Also added space between number and symbol according to International System of Units (SI)
pull/645/head
Patrick Fruh 2020-06-09 19:59:02 +02:00
parent 811236f8b4
commit 2fe56b1e92
4 changed files with 8 additions and 8 deletions

View File

@ -131,9 +131,9 @@
const dt = new Date(ts).toLocaleDateString("en-us", timeoptions)
let val = series[seriesIndex][dataPointIndex];
if (val >= 1000) {
val = (val / 1000).toFixed(0) + " milliseconds"
val = (val / 1000).toFixed(0) + " ms"
} else {
val = (val).toFixed(0) + " microseconds"
val = (val).toFixed(0) + " μs"
}
return `<div class="chartmarker"><span>Response Time: </span><span class="font-3">${val}</span><span>${dt}</span></div>`
},

View File

@ -56,9 +56,9 @@
const dt = new Date(ts).toLocaleDateString("en-us", timeoptions)
let val = series[seriesIndex][dataPointIndex];
if (val >= 1000) {
val = (val / 1000).toFixed(0) + " milliseconds"
val = (val / 1000).toFixed(0) + " ms"
} else {
val = (val).toFixed(0) + " microseconds"
val = (val).toFixed(0) + " μs"
}
return `<div class="chartmarker"><span>Average Response Time: </span><span class="font-3">${val}</span><span>${dt}</span></div>`
},

View File

@ -167,9 +167,9 @@ export default Vue.mixin({
},
humanTime(val) {
if (val >= 1000) {
return Math.floor(val / 1000) + "ms"
return Math.floor(val / 1000) + " ms"
}
return Math.floor(val) + "μs"
return Math.floor(val) + " μs"
},
firstDayOfMonth(date) {
return startOfMonth(date)

View File

@ -270,9 +270,9 @@ export default {
const dt = new Date(ts).toLocaleDateString("en-us", timeoptions)
let val = series[seriesIndex][dataPointIndex];
if (val >= 1000) {
val = (val / 1000).toFixed(0) + " milliseconds"
val = (val / 1000).toFixed(0) + " ms"
} else {
val = (val).toFixed(0) + " microseconds"
val = (val).toFixed(0) + " μs"
}
return `<div class="chartmarker"><span>Response Time: </span><span class="font-3">${val}</span><span>${dt}</span></div>`
},