修改 方案数据echart数据格式
This commit is contained in:
@@ -11,7 +11,11 @@ export const yMethod = (arr: any) => {
|
||||
|
||||
if (maxValue > 1000) {
|
||||
max = Math.ceil(maxValue / 100) * 100
|
||||
min = (Math.floor(minValue / 100) - 1) * 100
|
||||
if (minValue == 0) {
|
||||
min = 0
|
||||
} else {
|
||||
min = (Math.floor(minValue / 100) - 1) * 100
|
||||
}
|
||||
} else {
|
||||
max = Math.ceil(maxValue / 10) * 10
|
||||
min = Math.floor(minValue / 10) * 10
|
||||
@@ -19,9 +23,9 @@ export const yMethod = (arr: any) => {
|
||||
|
||||
if (maxValue > 0 && maxValue < 1) {
|
||||
max = 1
|
||||
} else if (max == 0 && minValue > -1 && minValue < 0) {
|
||||
} else if (max == 0 && minValue > -1 && minValue < 0) {
|
||||
min = -1
|
||||
}
|
||||
}
|
||||
|
||||
return [min, max, interval]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user