-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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
fix(legend): inherit legend rich text color from legend's options #18260
Conversation
Thanks for your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. Please also a test case for this issue. Please check the wiki.
@Ovilia I've added a test case. Can you please review it? |
@pissang Please help review this PR. I'm not quite sure. |
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
Brief Information
This pull request is in the type of:
What does this PR do?
Inherit the legend's rich text color from the legend's options.
Fixed issues
textStyle.color
#18196Details
Before: What was the problem?
Rich text within the legend was inheriting color from the theme instead of the colors configured in the legend.
After: How does it behave after the fixing?
The rich text within a legend is inheriting now the colors from the legend's configuration (
legend.textStyle.color
when the legend item is active andlegend.inactiveColor
when inactive). However, user is still able to set color in rich options which will overridelegend.textStyle.color
.The problem was fixed by specifying
inheritColor
option increateTextStyle
function.Document Info
One of the following should be checked.
Misc
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
Other information