You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/03/09 04:24:44 UTC
[GitHub] [echarts] plainheart opened a new pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
plainheart opened a new pull request #16653:
URL: https://github.com/apache/echarts/pull/16653
## Brief Information
This pull request is in the type of:
- [x] bug fixing
- [ ] new feature
- [ ] others
### What does this PR do?
1. Fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
2. Fix ticks don't follow the axis direction when the chart is anticlockwise.
### Fixed issues
- #16640
## Details
### Before: What was the problem?
<!-- DESCRIBE THE BUG OR REQUIREMENT HERE. -->
<img src="https://user-images.githubusercontent.com/26999792/157372321-80fd08a5-956f-4e99-b131-63dd2739fcd5.png" width="300">
<!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
### After: How is it fixed in this PR?
<!-- THE RESULT AFTER FIXING AND A SIMPLE EXPLANATION ABOUT HOW IT IS FIXED. -->
<!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
<img src="https://user-images.githubusercontent.com/26999792/157372264-62bff20d-cd13-4ee3-a007-a573bc37c8db.png" width="300">
## Misc
<!-- ADD RELATED ISSUE ID WHEN APPLICABLE -->
- [ ] The API has been changed (apache/echarts-doc#xxx).
- [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
### Related test cases or examples to use the new APIs
Please refer to `test/gauge-case.html`.
## Others
### Merging options
- [ ] Please squash the commits into a single one when merging.
### Other information
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] pissang commented on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
pissang commented on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1073440574
LGTM
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] pissang edited a comment on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
pissang edited a comment on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1067501038
@plainheart
<del>Sorry for the late reply. Seems when the pointer switching from 59 to 60. The `startAngle` and `endAngle` will be switched and the `angleRangeSpan` will be negative after `normalizeArcAngles`
Example data:
`[-1.5707963267948966, 4.71238898038469]`
After `normalizeArcAngles` will be
`[4.71238898038469, -1.5707963267948966]`
</del>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] plainheart commented on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
plainheart commented on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1062842960
It seems the `clock` test case in `gauge-pointer.html` doesn't work perfectly. There will be an unexpected rotation when the second becomes 0 from 59.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] plainheart edited a comment on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
plainheart edited a comment on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1067570636
> Seems it's bacause in the case the clockwise is set to false when from 59 to 60. Similar case on the example https://echarts.apache.org/examples/zh/editor.html?c=gauge-clock&lang=js didn't have this issue.
@pissang The example on the website looks well since it disables the animation when the pointer is 60. And we can see the switch from 59 to 60 has no animation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] pissang commented on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
pissang commented on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1073438041
approved
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] pissang commented on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
pissang commented on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1067514473
It also fixes the issue when startAngle is set smaller than endAngle.
Before:
<img width="443" alt="image" src="https://user-images.githubusercontent.com/841551/158297458-95983dce-8bd5-4dfc-951c-f735f3ab73ef.png">
After:
<img width="254" alt="image" src="https://user-images.githubusercontent.com/841551/158297518-cebff734-a233-4328-bf49-43ef45e7ec10.png">
There is another undefined behavior when the angle span is larger than 360. The old logic will mod the angles and current will treat it as a circle.
Before:
<img width="309" alt="image" src="https://user-images.githubusercontent.com/841551/158297921-331a0843-6c94-4ec0-8638-74ea40d3a4f9.png">
After:
<img width="456" alt="image" src="https://user-images.githubusercontent.com/841551/158297978-667cea67-4efd-45bc-a767-d14e910e1603.png">
From my side the new behavior is more expected.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] pissang commented on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
pissang commented on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1067501038
@plainheart Sorry for the late reply. Seems when the pointer switching from 59 to 60. The `startAngle` and `endAngle` will be switched and the `angleRangeSpan` will be negative after `normalizeArcAngles`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] echarts-bot[bot] commented on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1073507663
Congratulations! Your PR has been merged. Thanks for your contribution! 👍
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] pissang edited a comment on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
pissang edited a comment on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1067501038
@plainheart
<del>Sorry for the late reply. Seems when the pointer switching from 59 to 60. The `startAngle` and `endAngle` will be switched and the `angleRangeSpan` will be negative after `normalizeArcAngles` </del>
Seems it's bacause in the case the clockwise is set to `false`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] plainheart merged pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
plainheart merged pull request #16653:
URL: https://github.com/apache/echarts/pull/16653
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] pissang edited a comment on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
pissang edited a comment on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1067501038
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] plainheart commented on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
plainheart commented on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1067570636
> Seems it's bacause in the case the clockwise is set to false when from 59 to 60. Similar case on the example https://echarts.apache.org/examples/zh/editor.html?c=gauge-clock&lang=js didn't have this issue.
The example on the website looks well since it disables the animation when the pointer is 60. And we can see the switch from 59 to 60 has no animation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] echarts-bot[bot] commented on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1062541260
Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request).
The pull request is marked to be `PR: author is committer` because you are a committer of this project.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] pissang edited a comment on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
pissang edited a comment on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1067501038
@plainheart
<del>Sorry for the late reply. Seems when the pointer switching from 59 to 60. The `startAngle` and `endAngle` will be switched and the `angleRangeSpan` will be negative after `normalizeArcAngles` </del>
Seems it's bacause in the case the clockwise is set to `false` when from 59 to 60. Similar case on the example https://echarts.apache.org/examples/zh/editor.html?c=gauge-clock&lang=js didn't have this issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] pissang edited a comment on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
pissang edited a comment on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1067501038
@plainheart
<del>Sorry for the late reply. Seems when the pointer switching from 59 to 60. The `startAngle` and `endAngle` will be switched and the `angleRangeSpan` will be negative after `normalizeArcAngles` </del>
Seems it's bacause in the case the clockwise is set to `false` when from 59 to 60
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] pissang edited a comment on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
pissang edited a comment on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1067514473
It also fixes the issue when startAngle is set smaller than endAngle.
Before:
<img width="200" alt="image" src="https://user-images.githubusercontent.com/841551/158297458-95983dce-8bd5-4dfc-951c-f735f3ab73ef.png">
After:
<img width="100" alt="image" src="https://user-images.githubusercontent.com/841551/158297518-cebff734-a233-4328-bf49-43ef45e7ec10.png">
There is another undefined behavior when the angle span is larger than 360. The old logic will mod the angles and current will treat it as a circle.
Before:
<img width="150" alt="image" src="https://user-images.githubusercontent.com/841551/158297921-331a0843-6c94-4ec0-8638-74ea40d3a4f9.png">
After:
<img width="220" alt="image" src="https://user-images.githubusercontent.com/841551/158297978-667cea67-4efd-45bc-a767-d14e910e1603.png">
From my side the new behavior is more expected.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] pissang removed a comment on pull request #16653: fix(gauge): fix progress bar may become unexpectedly circle when value is `0` and `progress.roundCap` is enabled.
Posted by GitBox <gi...@apache.org>.
pissang removed a comment on pull request #16653:
URL: https://github.com/apache/echarts/pull/16653#issuecomment-1073438041
approved
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org