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',
|
'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'
|
||||||
],
|
],
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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',
|
||||||
|
Loading…
Reference in New Issue
Block a user