fix: rose pivotchart click legend then hover chart render error #2209

This commit is contained in:
fangsmile 2024-11-11 18:40:00 +08:00
parent 81ec1c596c
commit 014b15d162

View File

@ -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();
}