fix: 词云图点击事件位置优化

This commit is contained in:
wisonic-s 2023-10-31 22:38:22 +08:00
parent f67502a335
commit c36c3639a3

View File

@ -78,7 +78,7 @@ export class WordCloud extends G2PlotChartView<WordCloudOptions, G2WordCloud> {
const options = this.setupOptions(chart, initOptions)
const newChart = new G2WordCloud(container, options)
newChart.on('point:click', param => {
action({ data: { data: param.data.data.datum } })
action({ x: param.x, y: param.y, data: { data: param.data.data.datum } })
})
return newChart
}