fix: (NEZ-3420) chart legend 选中之后再取消 不生效
This commit is contained in:
@@ -174,7 +174,7 @@ export default {
|
|||||||
})
|
})
|
||||||
this.isGrey = this.isGrey.map(() => false)
|
this.isGrey = this.isGrey.map(() => false)
|
||||||
} else {
|
} else {
|
||||||
echarts.setSeries(index + 1, { show: true, focus: false })
|
echarts.setSeries(index + 1, { show: this.isGrey[index], focus: false })
|
||||||
this.$set(this.isGrey, index, !this.isGrey[index])
|
this.$set(this.isGrey, index, !this.isGrey[index])
|
||||||
}
|
}
|
||||||
this.$emit('legendChange', this.isGrey)
|
this.$emit('legendChange', this.isGrey)
|
||||||
|
|||||||
@@ -181,7 +181,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart (chartOptions = this.chartOption) {
|
initChart (chartOptions = this.chartOption) {
|
||||||
console.log(123123)
|
|
||||||
this.setDataLink()
|
this.setDataLink()
|
||||||
try {
|
try {
|
||||||
this.isStack = !!this.chartInfo.param.stack
|
this.isStack = !!this.chartInfo.param.stack
|
||||||
@@ -197,7 +196,6 @@ export default {
|
|||||||
const cursLeft = -10
|
const cursLeft = -10
|
||||||
const cursTop = -10
|
const cursTop = -10
|
||||||
const { seriesData, seriesAll } = this.initSeriesData(this.chartData)
|
const { seriesData, seriesAll } = this.initSeriesData(this.chartData)
|
||||||
console.log(seriesData)
|
|
||||||
this.isNoData = false
|
this.isNoData = false
|
||||||
if (!seriesData.length || seriesData.length == 1) {
|
if (!seriesData.length || seriesData.length == 1) {
|
||||||
this.isNoData = true
|
this.isNoData = true
|
||||||
@@ -420,7 +418,6 @@ export default {
|
|||||||
if (!dom) {
|
if (!dom) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log(dom.offsetWidth, dom.offsetHeight)
|
|
||||||
const width = dom.offsetWidth
|
const width = dom.offsetWidth
|
||||||
const height = dom.offsetHeight
|
const height = dom.offsetHeight
|
||||||
opts.width = width
|
opts.width = width
|
||||||
@@ -594,7 +591,6 @@ export default {
|
|||||||
this.renderYaxis()
|
this.renderYaxis()
|
||||||
},
|
},
|
||||||
resize () {
|
resize () {
|
||||||
console.log(123132123, 'resize')
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const dom = document.getElementById(`chart-canvas-${this.chartId}`)
|
const dom = document.getElementById(`chart-canvas-${this.chartId}`)
|
||||||
const width = dom.offsetWidth
|
const width = dom.offsetWidth
|
||||||
|
|||||||
@@ -4088,6 +4088,7 @@ export default {
|
|||||||
}
|
}
|
||||||
promqlInputIndexs.push(index)
|
promqlInputIndexs.push(index)
|
||||||
queryExpression.push(item)
|
queryExpression.push(item)
|
||||||
|
this.promqlKeys[index].expression = item
|
||||||
if (this.promqlKeys[index].queryType === 2) {
|
if (this.promqlKeys[index].queryType === 2) {
|
||||||
requestArr.push(this.$get('/prom/api/v1/query_instant?query=' + encodeURIComponent(item) + '&time=' + this.$stringTimeParseToUnix(bus.formateTimeToTime(this.filterTime[1]))))
|
requestArr.push(this.$get('/prom/api/v1/query_instant?query=' + encodeURIComponent(item) + '&time=' + this.$stringTimeParseToUnix(bus.formateTimeToTime(this.filterTime[1]))))
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user