This commit is contained in:
Cindy Chang
2024-07-29 14:47:23 +08:00
parent 09e38dc3c4
commit 311c98f57f
2 changed files with 13 additions and 5 deletions

View File

@@ -580,13 +580,21 @@ export default {
maxRotation: 0, // 不旋轉 lable 0~50
color: '#334155',
callback: ((value, index, values) => {
let x;
switch (valueData.type) {
case 'int':
return Math.round(value);
case 'float':
let x = index === 0 ? Math.floor(value * 100) / 100 :
index === values.length - 1 ? value = Math.ceil(value * 100) / 100 :
Math.round(value * 100) / 100;
switch (index) {
case 0:
x = Math.floor(value * 100) / 100;
break;
case values.length - 1:
x = Math.ceil(value * 100) / 100;
break;
default:
x = Math.round(value * 100) / 100;
}
// 處理科學記號等格式轉換
// Decimal 無法處理超過 16 位數
x = new Intl.NumberFormat(undefined, {useGrouping: false}).format(x);

View File

@@ -642,8 +642,8 @@ export default {
}
break;
case 'Trace': // Filter Type 選 Trace 的行為
let lowerIndex = this.$refs.filterTraceView.selectArea[0];
let upperIndex = this.$refs.filterTraceView.selectArea[1]-1;
const lowerIndex = this.$refs.filterTraceView.selectArea[0];
const upperIndex = this.$refs.filterTraceView.selectArea[1]-1;
data = {
type: 'trace-freq',
lower: this.allMapDataStore.traces[lowerIndex].id,