-
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(gauge): render gauge sectors in the order of the "clockwise" option #17691
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! It looks good to me except one small detail.
src/chart/gauge/GaugeView.ts
Outdated
|
||
prevEndAngle = endAngle; | ||
} | ||
|
||
sectors.reverse(); | ||
sectors.forEach(sector => group.add(sector)); |
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.
Please use each
from 'zrender/src/core/util'
instead of forEach
.
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?
add gauge sectors in the order of the "clockwise" option
Fixed issues
#17633
Details
Before: What was the problem?
The gauge view adds sectors in the order of the
colorList
option, however, these elements will be covered by elements added later, and the order of the sectors looks reversed when theroundCap
option is enabled.After: How does it behave after the fixing?
Reverse the sectors array before adding them to the graphic group
Document Info
One of the following should be checked.
Misc
ZRender Changes
Related test cases or examples to use the new APIs
gauge-case
Others
Merging options
Other information