Merge pull request #5477 from dataease/pr@dev@feat_word_cloud_link_jump

feat(视图-词云): 词云支持联动和跳转
This commit is contained in:
wisonic-s 2023-06-19 16:56:30 +08:00 committed by GitHub
commit 278f6abec1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 8 deletions

View File

@ -192,7 +192,6 @@ export default {
'gauge',
'text',
'label',
'word-cloud',
'flow-map',
'bidirectional-bar'
],
@ -202,7 +201,6 @@ export default {
'gauge',
'text',
'label',
'word-cloud',
'flow-map',
'bidirectional-bar'
],

View File

@ -38,6 +38,7 @@ export function baseWordCloudOptionAntV(plot, container, chart, action) {
plot.destroy()
}
plot = new WordCloud(container, options)
plot.off('point:click')
plot.on('point:click', action)
return plot
}

View File

@ -287,7 +287,7 @@ export default {
}
}
if (this.myChart && !equalsAny(chart.type ,'liquid','flow-map') && this.searchCount > 0) {
if (this.myChart && !equalsAny(chart.type, 'liquid', 'flow-map') && this.searchCount > 0) {
this.myChart.options.animation = false
}
if (this.myChart?.options?.legend) {
@ -319,10 +319,18 @@ export default {
},
antVAction(param) {
if (this.chart.type === 'treemap') {
this.pointParam = param.data.data
} else {
this.pointParam = param.data
switch (this.chart.type) {
case 'treemap':
this.pointParam = param.data.data
break
case 'word-cloud':
this.pointParam = {
data: param.data.data.datum
}
break
default:
this.pointParam = param.data
break
}
this.linkageActiveParam = {
category: this.pointParam.data.category ? this.pointParam.data.category : 'NO_DATA',