Skip to content

Commit 1b6c315

Browse files
committed
fix: chartNode occor error
1 parent a5eef79 commit 1b6c315

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/vtable/src/PivotChart.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,7 +1736,7 @@ export class PivotChart extends BaseTable implements PivotChartAPI {
17361736
if (hoverCell.col !== -1 && hoverCell.row !== -1) {
17371737
const cellGroup = this.scenegraph.getCell(hoverCell.col, hoverCell.row);
17381738
const chartNode: Chart = cellGroup?.getChildren()?.[0] as Chart;
1739-
chartNode.activeChartInstance?.disableTooltip(true);
1739+
chartNode?.activeChartInstance?.disableTooltip(true);
17401740
}
17411741
//将所有的图表实例调用一下disableDimensionHover 以防止在brush过程中显示tooltip。再用户清空brush状态时恢复
17421742
disableTooltipToAllChartInstances(this.scenegraph);
@@ -1747,7 +1747,7 @@ export class PivotChart extends BaseTable implements PivotChartAPI {
17471747
if (hoverCell.col !== -1 && hoverCell.row !== -1) {
17481748
const cellGroup = this.scenegraph.getCell(hoverCell.col, hoverCell.row);
17491749
const chartNode: Chart = cellGroup?.getChildren()?.[0] as Chart;
1750-
chartNode.activeChartInstance?.disableTooltip(false);
1750+
chartNode?.activeChartInstance?.disableTooltip(false);
17511751
}
17521752
//将所有的图表实例调用一下enableDimensionHover 以防止在brush过程中显示tooltip。再用户清空brush状态时恢复
17531753
enableTooltipToAllChartInstances(this.scenegraph);

0 commit comments

Comments
 (0)