fix:优化 value小于1的 Y轴表现

This commit is contained in:
zhangyu
2022-03-30 18:06:03 +08:00
parent ac53f7b7d3
commit ece3b2edef
3 changed files with 2 additions and 4 deletions

View File

@@ -297,7 +297,6 @@ export default {
this.chartChildrenData = flag
},
resize () {
console.log(this.$refs['chart' + this.chartInfo.id])
this.$refs['chart' + this.chartInfo.id] && this.$refs['chart' + this.chartInfo.id].resize()
},
refreshLogs (params) {

View File

@@ -331,7 +331,6 @@ export default {
}
},
resize () {
console.log(213)
setTimeout(() => {
getChart(this.chartId) && getChart(this.chartId).resize()
}, 100)

View File

@@ -34,7 +34,7 @@ function percent02 (value, index) {
if (!numberWithEConvent(scientificNotationValue)) {
return `${scientificNotationValue} %`
}
value = parseFloat(keepDoubleNumber(Number(value) * 100))
value = parseFloat(keepDoubleNumber((Number(value) * 100).toFixed(2)))
return `${value} %`
}
function localFormat (value, index) {
@@ -728,7 +728,7 @@ export default {
pow++
value = value * 10
}
return Math.ceil(value + 1) / Math.pow(10, pow)
return Math.floor(value + 1) / Math.pow(10, pow)
}
if (type === 'Time') {
return value