测试bug修改

This commit is contained in:
GGJ
2024-10-21 09:09:56 +08:00
parent 7670da7f9f
commit 9ec4a8676c
7 changed files with 33 additions and 35 deletions

View File

@@ -1,20 +1,16 @@
import { install$2 } from 'echarts/types/dist/shared'
export const yMethod = (arr: any) => {
let interval = 0
let maxValue = 0
let minValue = 0
let max = 0
let min = 0
maxValue = Math.max(...arr)
minValue = Math.min(...arr)
if (maxValue > 1000) {
if (maxValue > 1000 ||minValue < -1000) {
max = Math.ceil(maxValue / 100) * 100
if (minValue == 0) {
min = 0
} else {
min = (Math.floor(minValue / 100) - 1) * 100
min = (Math.floor(minValue / 100) ) * 100
}
} else {
max = Math.ceil(maxValue / 10) * 10
@@ -26,6 +22,5 @@ export const yMethod = (arr: any) => {
} else if (max == 0 && minValue > -1 && minValue < 0) {
min = -1
}
return [min, max, interval]
return [min, max]
}