Skip to content

Fix/sankey tooltip when zero#4557

Merged
xuefei1313 merged 2 commits intodev/1.13.0from
fix/sankey-tooltip-when-zero
Apr 13, 2026
Merged

Fix/sankey tooltip when zero#4557
xuefei1313 merged 2 commits intodev/1.13.0from
fix/sankey-tooltip-when-zero

Conversation

@xuefei1313
Copy link
Copy Markdown
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

🔗 Related PR link

🐞 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

copilot:summary

🔍 Walkthrough

copilot:walkthrough

The Sankey tooltip helper treated source=0 as falsy, so link tooltips for the
first indexed source skipped the expected "A => B" title.
Add a regression test for the zero-index case and record the package changefile.

Constraint: Sankey links can reference nodes by numeric index including 0
Rejected: Coerce source/target to strings before checks | still obscures the real bug
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Use nil checks for Sankey source/target presence instead of truthiness checks
Tested: npm test -- --runInBand __tests__/unit/series/sankey.test.ts; npm run compile
Not-tested: Browser hover interaction in the runtime playground
@xuefei1313 xuefei1313 merged commit 413a1d0 into dev/1.13.0 Apr 13, 2026
1 of 5 checks passed
@xuefei1313 xuefei1313 deleted the fix/sankey-tooltip-when-zero branch April 13, 2026 13:06
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