mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 11:32:57 +08:00
fix(图表): 修复雷达图开启标签之后无法触发联动或跳转事件
This commit is contained in:
parent
e79728d554
commit
3ec5577c02
@ -119,6 +119,17 @@ export class Radar extends G2PlotChartView<RadarOptions, G2Radar> {
|
||||
const { Radar: G2Radar } = await import('@antv/g2plot/esm/plots/radar')
|
||||
const newChart = new G2Radar(container, options)
|
||||
newChart.on('point:click', action)
|
||||
if (options.label) {
|
||||
newChart.on('label:click', e => {
|
||||
action({
|
||||
x: e.x,
|
||||
y: e.y,
|
||||
data: {
|
||||
data: e.target.attrs.data
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
configPlotTooltipEvent(chart, newChart)
|
||||
return newChart
|
||||
}
|
||||
@ -175,6 +186,7 @@ export class Radar extends G2PlotChartView<RadarOptions, G2Radar> {
|
||||
group.addShape({
|
||||
type: 'text',
|
||||
attrs: {
|
||||
data,
|
||||
x: 0,
|
||||
y: 0,
|
||||
text: value,
|
||||
|
Loading…
Reference in New Issue
Block a user