Skip to content

Comments

Fix/linear gradient string in tooltip#4183

Merged
xuefei1313 merged 3 commits intodevelopfrom
fix/linear-gradient-string-in-tooltip
Sep 17, 2025
Merged

Fix/linear gradient string in tooltip#4183
xuefei1313 merged 3 commits intodevelopfrom
fix/linear-gradient-string-in-tooltip

Conversation

@xile611
Copy link
Contributor

@xile611 xile611 commented Sep 4, 2025

[中文版模板 / 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

@xile611 xile611 added this to the 2.0.5 milestone Sep 4, 2025
@xile611 xile611 requested a review from Copilot September 4, 2025 03:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where tooltip icons don't display correctly when the shape fill color is provided as a gradient string. The fix adds proper parsing of gradient strings using the GradientParser utility.

Key changes:

  • Import GradientParser and IColor type from @visactor/vrender-core
  • Add logic to detect and parse gradient strings before processing shape fill colors
  • Update the condition that determines whether to use simple string fills versus gradient objects

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/vchart/src/plugin/components/tooltip-handler/utils/svg.ts Adds gradient string parsing logic to handle tooltip shape fills correctly
common/changes/@visactor/vchart/fix-linear-gradient-string-in-tooltip_2025-09-04-02-59.json Changelog entry documenting the gradient string tooltip fix

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

xuefei1313
xuefei1313 previously approved these changes Sep 4, 2025
@xuefei1313 xuefei1313 merged commit 5e833ae into develop Sep 17, 2025
6 of 8 checks passed
@xuefei1313 xuefei1313 deleted the fix/linear-gradient-string-in-tooltip branch September 17, 2025 06:32
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.

2 participants