|
@@ -238,11 +238,11 @@ const render = () => {
|
|
|
|
|
|
|
|
const values = Object.values(chartMap.value).flatMap((item) => item.value.map((d) => d.value))
|
|
const values = Object.values(chartMap.value).flatMap((item) => item.value.map((d) => d.value))
|
|
|
|
|
|
|
|
- const maxVal = Math.max(...values)
|
|
|
|
|
|
|
+ const maxVal = Math.max(...values, 10000)
|
|
|
const minVal = Math.min(...values, -100)
|
|
const minVal = Math.min(...values, -100)
|
|
|
|
|
|
|
|
const maxDigits = (Math.floor(maxVal) + '').length
|
|
const maxDigits = (Math.floor(maxVal) + '').length
|
|
|
- const minDigits = (Math.floor(Math.abs(minVal)) + '').length
|
|
|
|
|
|
|
+ const minDigits = (Math.floor(Math.abs(minVal)) + '').length - 1
|
|
|
const interval = Math.max(maxDigits, minDigits)
|
|
const interval = Math.max(maxDigits, minDigits)
|
|
|
|
|
|
|
|
maxInterval = interval
|
|
maxInterval = interval
|
|
@@ -285,7 +285,11 @@ const render = () => {
|
|
|
max: maxInterval,
|
|
max: maxInterval,
|
|
|
interval: 1,
|
|
interval: 1,
|
|
|
axisLabel: {
|
|
axisLabel: {
|
|
|
- formatter: (v) => (v === 0 ? '0' : v > 0 ? Math.pow(10, v) : -Math.pow(10, -v))
|
|
|
|
|
|
|
+ formatter: (v) => {
|
|
|
|
|
+ const num = v === 0 ? 0 : v > 0 ? Math.pow(10, v) : -Math.pow(10, -v)
|
|
|
|
|
+
|
|
|
|
|
+ return num.toLocaleString()
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
legend: {
|
|
legend: {
|