From ef1bcf182b156fa54955865caa5896dd095373bc Mon Sep 17 00:00:00 2001 From: fangsmile <892739385@qq.com> Date: Mon, 11 Nov 2024 16:50:57 +0800 Subject: [PATCH 1/4] fix: pivot chart pie type selected state not work #2178 --- packages/vtable/src/PivotChart.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/vtable/src/PivotChart.ts b/packages/vtable/src/PivotChart.ts index 1d8699bf6..8b29c11b2 100644 --- a/packages/vtable/src/PivotChart.ts +++ b/packages/vtable/src/PivotChart.ts @@ -1181,6 +1181,12 @@ export class PivotChart extends BaseTable implements PivotChartAPI { delete spec.area.state.selected; delete spec.area.state.selected_reverse; } + if (spec.pie?.state?.selected) { + spec.pie.state.vtable_selected = spec.pie.state.selected; + spec.pie.state.vtable_selected_reverse = spec.pie.state.selected_reverse; + delete spec.pie.state.selected; + delete spec.pie.state.selected_reverse; + } }; this.internalProps.indicators?.forEach((indicator: string | IIndicator) => { if ((indicator as IChartColumnIndicator).chartSpec) { From 81ec1c596c5903821a73c77f26e416e8d406c687 Mon Sep 17 00:00:00 2001 From: fangsmile <892739385@qq.com> Date: Mon, 11 Nov 2024 16:51:38 +0800 Subject: [PATCH 2/4] docs: update changlog of rush --- ...ie-selected-selected_reverse_2024-11-11-08-51.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/@visactor/vtable/2178-bug-pivotchart-pie-selected-selected_reverse_2024-11-11-08-51.json diff --git a/common/changes/@visactor/vtable/2178-bug-pivotchart-pie-selected-selected_reverse_2024-11-11-08-51.json b/common/changes/@visactor/vtable/2178-bug-pivotchart-pie-selected-selected_reverse_2024-11-11-08-51.json new file mode 100644 index 000000000..f1543d239 --- /dev/null +++ b/common/changes/@visactor/vtable/2178-bug-pivotchart-pie-selected-selected_reverse_2024-11-11-08-51.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: pivot chart pie type selected state not work #2178\n\n", + "type": "none", + "packageName": "@visactor/vtable" + } + ], + "packageName": "@visactor/vtable", + "email": "892739385@qq.com" +} \ No newline at end of file From 014b15d1622bc5acd0b99cab3a1d155433d695d0 Mon Sep 17 00:00:00 2001 From: fangsmile <892739385@qq.com> Date: Mon, 11 Nov 2024 18:40:00 +0800 Subject: [PATCH 3/4] fix: rose pivotchart click legend then hover chart render error #2209 --- .../vtable/src/scenegraph/refresh-node/update-chart.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/vtable/src/scenegraph/refresh-node/update-chart.ts b/packages/vtable/src/scenegraph/refresh-node/update-chart.ts index 6cadb6e28..3a864d427 100644 --- a/packages/vtable/src/scenegraph/refresh-node/update-chart.ts +++ b/packages/vtable/src/scenegraph/refresh-node/update-chart.ts @@ -297,10 +297,13 @@ export function updateChartData(scenegraph: Scenegraph) { cellNode.children.forEach((node: Chart) => { if ((node as any).type === 'chart') { node.updateData(table.getCellValue(col, row)); - const newAxes = table.internalProps.layoutMap.getChartAxes(col, row); - node.setAttribute('axes', newAxes); const chartSpec = node.attribute.spec; - chartSpec.axes = newAxes; + const chartType = chartSpec.type; + if (chartType !== 'gauge' && chartType !== 'rose' && chartType !== 'radar') { + const newAxes = table.internalProps.layoutMap.getChartAxes(col, row); + node.setAttribute('axes', newAxes); + chartSpec.axes = newAxes; + } node.setAttribute('spec', chartSpec); // node.addUpdateBoundTag(); } From 475cb4966853354c3754b9de2762c900a814ad9f Mon Sep 17 00:00:00 2001 From: fangsmile <892739385@qq.com> Date: Mon, 11 Nov 2024 18:40:29 +0800 Subject: [PATCH 4/4] docs: update changlog of rush --- ...ie-selected-selected_reverse_2024-11-11-10-40.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/@visactor/vtable/2178-bug-pivotchart-pie-selected-selected_reverse_2024-11-11-10-40.json diff --git a/common/changes/@visactor/vtable/2178-bug-pivotchart-pie-selected-selected_reverse_2024-11-11-10-40.json b/common/changes/@visactor/vtable/2178-bug-pivotchart-pie-selected-selected_reverse_2024-11-11-10-40.json new file mode 100644 index 000000000..03a0266ba --- /dev/null +++ b/common/changes/@visactor/vtable/2178-bug-pivotchart-pie-selected-selected_reverse_2024-11-11-10-40.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: rose pivotchart click legend then hover chart render error #2209\n\n", + "type": "none", + "packageName": "@visactor/vtable" + } + ], + "packageName": "@visactor/vtable", + "email": "892739385@qq.com" +} \ No newline at end of file