-
Notifications
You must be signed in to change notification settings - Fork 19.7k
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): fix z2 is negative when maxVal is negative #20276
Conversation
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.
I don't think #20097 should be a bug. I commented at #20097 (comment) . Can you have a look, please?
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.
It seems that you can use linearMap
in src/util/number.ts
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-20276@88345fe |
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!
A minor tip: please don't use force push next time. This will lose the commit history and our discussion context. We will use "squash and merge" if there are too many unnecessary commits.
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
Thanks very much for your advice! |
Brief Information
This pull request is in the type of:
What does this PR do?
When
max
of a gauge is negative, thez2
calculated is also negative. Thus the axisLine is on top of the progress bar. This PR fixes howz2
is calculated to ensure it is always non-negative.Fixed issues
fix #20097
Details
Before: What was the problem?
The progress bar is beneath the axisLine.
After: How does it behave after the fixing?
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