close
Skip to content

fix(tree): fix tree update error with animation and without animation - #18491

Open
linghaoSu wants to merge 2 commits into
apache:masterfrom
linghaoSu:fix/tree_line-redunant
Open

fix(tree): fix tree update error with animation and without animation#18491
linghaoSu wants to merge 2 commits into
apache:masterfrom
linghaoSu:fix/tree_line-redunant

Conversation

@linghaoSu

Copy link
Copy Markdown
Member

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

  1. For polyline, with animation on, to filter out nodes that are about to exit, and clear sourceEdge if the number of remaining nodes is 0
  2. For all tree, with animation off, pass the current node in removeNodeEdge since the current node is immediately deleted, making it impossible to get the current node by dataIndex.

Fixed issues

Details

Before: What was the problem?

  1. For polyline, when a child node is removed by updating the node, the line is not removed
  2. For all trees, when collapsing a node with animation off, lines will be left behind

After: How does it behave after the fixing?

  1. for polyline, when a child node is removed by updating the node, the lines will be removed
  2. For all trees, collapse the node with the animation off, no lines will be left

Document Info

One of the following should be checked.

  • This PR doesn't relate to document changes
  • The document should be updated later
  • The document changes have been made in apache/echarts-doc#xxx

Misc

ZRender Changes

  • This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

N.A.

Others

Merging options

  • Please squash the commits into a single one when merging.

Other information

@echarts-bot

echarts-bot Bot commented Apr 10, 2023

Copy link
Copy Markdown

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

@Ovilia Ovilia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR! This fixes an important bug of Tree Series.

Comment thread src/chart/tree/TreeView.ts Outdated
Comment thread src/chart/tree/TreeView.ts Outdated
@Rubp-007

Rubp-007 commented May 9, 2024

Copy link
Copy Markdown

@Ovilia When will this PR be reviewed? It's been almost a year now and the bug persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants