forked from github/dataease
Merge pull request #5477 from dataease/pr@dev@feat_word_cloud_link_jump
feat(视图-词云): 词云支持联动和跳转
This commit is contained in:
commit
278f6abec1
@ -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'
|
||||
],
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user