From 4a61b8d33d041f9faea9d64e8893517072957c5a Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Tue, 7 May 2024 11:21:12 +0800 Subject: [PATCH 1/2] fix: fixed the problem that when the label of the sankey chart is hidden, an error will be reported when clicking on the blank space --- packages/vchart/src/series/sankey/sankey.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vchart/src/series/sankey/sankey.ts b/packages/vchart/src/series/sankey/sankey.ts index 8897e046a4..eb646db153 100644 --- a/packages/vchart/src/series/sankey/sankey.ts +++ b/packages/vchart/src/series/sankey/sankey.ts @@ -598,19 +598,19 @@ export class SankeySeries exten }; protected _handleClearEmpty = () => { - const allNodeElements = this._nodeMark.getProductElements(); + const allNodeElements = this._nodeMark?.getProductElements(); if (!allNodeElements || !allNodeElements.length) { return; } - const allLinkElements = this._linkMark.getProductElements(); + const allLinkElements = this._linkMark?.getProductElements(); if (!allLinkElements || !allLinkElements.length) { return; } - const allLabelElements = this._labelMark.getProductElements(); + const allLabelElements = this._labelMark?.getProductElements(); if (!allLabelElements || !allLabelElements.length) { return; From 4664b365f76a47714fca8b100eb9cae85ea0a75d Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Tue, 7 May 2024 11:21:28 +0800 Subject: [PATCH 2/2] docs: update changlog of rush --- ...fix-sankey-handleClear-error_2024-05-07-03-21.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/@visactor/vchart/fix-sankey-handleClear-error_2024-05-07-03-21.json diff --git a/common/changes/@visactor/vchart/fix-sankey-handleClear-error_2024-05-07-03-21.json b/common/changes/@visactor/vchart/fix-sankey-handleClear-error_2024-05-07-03-21.json new file mode 100644 index 0000000000..7b6dfa4934 --- /dev/null +++ b/common/changes/@visactor/vchart/fix-sankey-handleClear-error_2024-05-07-03-21.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: fixed the problem that when the label of the sankey chart is hidden, an error will be reported when clicking on the blank space\n\n", + "type": "none", + "packageName": "@visactor/vchart" + } + ], + "packageName": "@visactor/vchart", + "email": "lixuef1313@163.com" +} \ No newline at end of file