8000 Fix/sankey handle clear error by xuefei1313 · Pull Request #2630 · VisActor/VChart · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix/sankey handle clear error #2630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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"
}
6 changes: 3 additions & 3 deletions packages/vchart/src/series/sankey/sankey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,19 +598,19 @@ export class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpec> 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;
Expand Down
0