Skip to content
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

[Bug]: Add combo and render will cause strange behavior #6804

Open
2 of 10 tasks
Rey-Wang opened this issue Feb 24, 2025 · 4 comments
Open
2 of 10 tasks

[Bug]: Add combo and render will cause strange behavior #6804

Rey-Wang opened this issue Feb 24, 2025 · 4 comments
Labels
waiting for maintainer Triage or intervention needed from a maintainer.

Comments

@Rey-Wang
Copy link
Contributor

Rey-Wang commented Feb 24, 2025

Describe the bug / 问题描述

When using antv-dagre layout, if user setData to add a combo, and calls graph.render immediately would cause the wrong result

you can check the image below (I provided the sandbox link but all examples in sandbox throw an error 😥)

Image

Reproduction link / 复现链接

https://codesandbox.io/p/sandbox/55lk55

Steps to Reproduce the Bug or Issue / 重现步骤

No response

Version / 版本

5.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他
@Rey-Wang Rey-Wang added the waiting for maintainer Triage or intervention needed from a maintainer. label Feb 24, 2025
Copy link

It seems like you're experiencing an issue with the antv-dagre layout in G6 when adding a combo and rendering immediately. This can sometimes lead to unexpected behavior due to the sequence of operations.

Here are a few suggestions you might try to resolve or work around the issue:

  1. Delay Rendering: After adding the combo with setData, try introducing a slight delay before calling graph.render(). This can sometimes help in ensuring that all data changes are fully processed before rendering.

  2. Check Data Integrity: Ensure that the data being passed to setData is correctly structured and complete. Incomplete or incorrect data can sometimes lead to rendering issues.

  3. Use graph.updateLayout(): Instead of calling graph.render() immediately, you might want to try using graph.updateLayout() to see if it resolves the issue.

  4. Debugging: Use console logs or debugging tools to inspect the state of the graph and data before and after calling setData and render. This might give you insights into what's going wrong.

If these suggestions do not resolve the issue, it might be beneficial to look into the specific implementation details or consider reaching out to the G6 community for more targeted assistance.

If you have any further questions or need more detailed help, feel free to ask!

🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

@Rey-Wang
Copy link
Contributor Author

BTW, when I use graph render in my local, graph render would not resolve in this scenario

@Rey-Wang
Copy link
Contributor Author

ah, once antv-dagre meets empty combo, it would cause the issue

@zhongyunWan zhongyunWan changed the title [Bug]: Add combo and render will cause strange behavior [Docs]: Add combo and render will cause strange behavior Feb 25, 2025
@zhongyunWan zhongyunWan changed the title [Docs]: Add combo and render will cause strange behavior [docs]: Add combo and render will cause strange behavior Feb 25, 2025
@zhongyunWan zhongyunWan added the documentation 📖 Improvements or additions to documentation label Feb 25, 2025
@github-actions github-actions bot removed the waiting for maintainer Triage or intervention needed from a maintainer. label Feb 25, 2025
@zhongyunWan zhongyunWan added resolved This issue has been resolved and is now available in the latest release and removed resolved This issue has been resolved and is now available in the latest release labels Feb 25, 2025
@zhongyunWan zhongyunWan changed the title [docs]: Add combo and render will cause strange behavior [Bugs]: Add combo and render will cause strange behavior Feb 25, 2025
@zhongyunWan zhongyunWan added waiting for maintainer Triage or intervention needed from a maintainer. and removed documentation 📖 Improvements or additions to documentation labels Feb 25, 2025
@zhongyunWan zhongyunWan changed the title [Bugs]: Add combo and render will cause strange behavior [Bug]: Add combo and render will cause strange behavior Feb 25, 2025
@Rey-Wang
Copy link
Contributor Author

and it may related, that the render would cause the page to freeze.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for maintainer Triage or intervention needed from a maintainer.
Projects
None yet
Development

No branches or pull requests

2 participants