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', 'gauge',
'text', 'text',
'label', 'label',
'word-cloud',
'flow-map', 'flow-map',
'bidirectional-bar' 'bidirectional-bar'
], ],
@ -202,7 +201,6 @@ export default {
'gauge', 'gauge',
'text', 'text',
'label', 'label',
'word-cloud',
'flow-map', 'flow-map',
'bidirectional-bar' 'bidirectional-bar'
], ],

View File

@ -38,6 +38,7 @@ export function baseWordCloudOptionAntV(plot, container, chart, action) {
plot.destroy() plot.destroy()
} }
plot = new WordCloud(container, options) plot = new WordCloud(container, options)
plot.off('point:click')
plot.on('point:click', action)
return plot 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 this.myChart.options.animation = false
} }
if (this.myChart?.options?.legend) { if (this.myChart?.options?.legend) {
@ -319,10 +319,18 @@ export default {
}, },
antVAction(param) { antVAction(param) {
if (this.chart.type === 'treemap') { switch (this.chart.type) {
case 'treemap':
this.pointParam = param.data.data this.pointParam = param.data.data
} else { break
case 'word-cloud':
this.pointParam = {
data: param.data.data.datum
}
break
default:
this.pointParam = param.data this.pointParam = param.data
break
} }
this.linkageActiveParam = { this.linkageActiveParam = {
category: this.pointParam.data.category ? this.pointParam.data.category : 'NO_DATA', category: this.pointParam.data.category ? this.pointParam.data.category : 'NO_DATA',