Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix: avoid duplicate event handlers after chart remake - #4633

#4633
Open
xuefei1313 wants to merge 1 commit into
developVisActor/VChart:developfrom
fix/event-listener-remake-duplicationVisActor/VChart:fix/event-listener-remake-duplicationCopy head branch name to clipboard
Open

fix: avoid duplicate event handlers after chart remake#4633
xuefei1313 wants to merge 1 commit into
developVisActor/VChart:developfrom
fix/event-listener-remake-duplicationVisActor/VChart:fix/event-listener-remake-duplicationCopy head branch name to clipboard

Conversation

@xuefei1313

Copy link
Copy Markdown
Contributor

🤔 This is a ...

  • Bug fix
  • New feature
  • 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

N/A

🔗 Related PR link

N/A

🐞 Bugserver case id

N/A

💡 Background and solution

pointerdown 用户回调中调用 updateSpec,且更新触发图表重建时,VChart 会重复回放已注册的用户事件,因此后续点击会额外触发回调。

重建时不再回放仍由 VChart 全局事件实例持有的用户监听;同时释放旧 chart-owned Event 的内部监听,避免 interaction 等模块在重建后重复注册。不会清空共享 EventDispatcher,因此不会影响其他模块或用户事件。

新增回归测试、chart 事件释放测试,以及 browser 复现页。

📝 Changelog

Language Changelog
🇺🇸 English fix: prevent duplicate event callbacks after updateSpec remakes a chart
🇨🇳 Chinese fix: 修复 updateSpec 重建图表后用户事件回调重复触发的问题

☑️ Self-Check before Merge

  • Doc is not needed
  • Demo is provided
  • TypeScript definition is not needed
  • Changelog is provided

🚀 Summary

copilot:summary

🔍 Walkthrough

copilot:walkthrough

@xuefei1313
xuefei1313 marked this pull request as ready for review July 28, 2026 10:00
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.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.