表格渲染输入框&散点图的问题

This commit is contained in:
2023-08-11 16:01:10 +08:00
parent 0b633a703a
commit 15126dea99
63 changed files with 71 additions and 34 deletions

View File

@@ -123,6 +123,8 @@ export default {
this.chart = echarts.init(chartDom)
let legendList = []
let seriesList = []
let num = 0 // 计算点的数量判断后续bursh是否需要延迟
let delayTime = 0
for (let i in this.defectMsg) {
legendList.push(this.transLabel(i))
let arr1 = []
@@ -132,6 +134,7 @@ export default {
arr2.push(2600 - parseInt(j.ypos))
arr2.push(2250 - parseInt(j.xpos))
arr1.push(arr2)
num++
}
obj.name = this.transLabel(i)
obj.type = 'scatter'
@@ -139,6 +142,15 @@ export default {
obj.symbolSize = 5
seriesList.push(obj)
}
if (num <= 3000) {
delayTime = 0
} else if (3000 < num <= 7000) {
delayTime = 1000
} else if (7000 < num <= 10000) {
delayTime = 2000
} else {
delayTime = 3000
}
var option = {
color: [
'#5d7ab7',
@@ -170,7 +182,12 @@ export default {
},
brush: {
toolbox: ['rect', 'clear'],
xAxisIndex: 0
xAxisIndex: 0,
throttleType: 'debounce',
throttleDelay: delayTime
},
tooltip: {
formatter: '{c},{a}'
},
grid: {
x: 60,
@@ -188,9 +205,13 @@ export default {
splitLine: {
show: true,
lineStyle: {
type: 'dashed',
color: 'rgba(0, 0, 0, 0.15)'
}
},
axisLabel: {
rotate: 45
},
max: 2600,
min: 0,
interval: 100
@@ -205,6 +226,7 @@ export default {
splitLine: {
show: true,
lineStyle: {
type: 'dashed',
color: 'rgba(0, 0, 0, 0.15)'
}
},