mirror of
https://github.com/dataease/dataease.git
synced 2026-05-18 09:48:10 +08:00
fix(图表): 修复环形图&饼图数据合并后点击其它仍可触发下钻&联动&跳转事件的问题
This commit is contained in:
@@ -27,7 +27,6 @@ import type { Datum } from '@antv/g2plot/esm/types/common'
|
||||
import { add } from 'mathjs'
|
||||
import isEmpty from 'lodash-es/isEmpty'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import { Chart } from '@antv/g2'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
const { t } = useI18n()
|
||||
const DEFAULT_DATA = []
|
||||
@@ -133,7 +132,9 @@ export class Pie extends G2PlotChartView<PieOptions, G2Pie> {
|
||||
const options = this.setupOptions(chart, initOptions)
|
||||
const { Pie: G2Pie } = await import('@antv/g2plot/esm/plots/pie')
|
||||
const newChart = new G2Pie(container, options)
|
||||
newChart.on('interval:click', action)
|
||||
newChart.on('interval:click', d => {
|
||||
d.data?.data?.field !== customAttr.basicStyle.topNLabel && action(d)
|
||||
})
|
||||
configPlotTooltipEvent(chart, newChart)
|
||||
return newChart
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user