Fix/linear gradient string in tooltip#4183
Merged
xuefei1313 merged 3 commits intodevelopfrom Sep 17, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
GradientParserandIColortype 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.
packages/vchart/src/plugin/components/tooltip-handler/utils/svg.ts
Outdated
Show resolved
Hide resolved
packages/vchart/src/plugin/components/tooltip-handler/utils/svg.ts
Outdated
Show resolved
Hide resolved
xuefei1313
previously approved these changes
Sep 4, 2025
xuefei1313
approved these changes
Sep 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
🔗 Related PR link
🐞 Bugserver case id
💡 Background and solution
📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
copilot:summary
🔍 Walkthrough
copilot:walkthrough