Skip to content

fix: update VennSeries to handle empty keys and filter valid legend keys #4000

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

Open
wants to merge 2 commits into
base: dev/2.0.0
Choose a base branch
from

Conversation

afkdsghk211331
Copy link
Contributor

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Refactoring
  • Update dependency
  • Code style optimization
  • Test Case
  • Branch merge
  • Release
  • Site / documentation update
  • Demo update
  • Workflow
  • Other (about what?)

🔗 Related issue link

#2847

🔗 Related PR link

VisActor/VUtil#239

🐞 Bugserver case id

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

This pull request refines the logic for handling selected keys in the VennSeries class to improve filtering and ensure proper handling of empty keys. The most important changes focus on enhancing the filtering process and maintaining consistency in the selected keys array.

Improvements to key filtering and handling:

  • Introduced a new emptyKey constant and added logic to check for and handle empty keys ('') in the selectedKeys array. This ensures that empty keys are preserved when appropriate.
  • Refined the filtering process by separating non-empty keys from the selectedKeys array and using only valid keys from originalLegendKeys for further operations. This avoids processing invalid or empty keys.
  • Updated the logic for removing derived keys from the selectedKeys array to operate on the filtered nonEmpty keys, improving clarity and correctness.

🔍 Walkthrough

copilot:walkthrough

@afkdsghk211331 afkdsghk211331 marked this pull request as ready for review May 28, 2025 12:02
@xile611 xile611 added this to the v2.0.0 milestone May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants