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 2021/08/24 05:47:48 UTC

[GitHub] [echarts] Ovilia opened a new pull request #15589: fix(polar): wrong sector clockwise when previous data is 0 #15517

Ovilia opened a new pull request #15589:
URL: https://github.com/apache/echarts/pull/15589


   <!-- Please fill in the following information to help us review your PR more efficiently. -->
   
   ## Brief Information
   
   This pull request is in the type of:
   
   - [x] bug fixing
   - [ ] new feature
   - [ ] others
   
   
   
   ### What does this PR do?
   
   <!-- USE ONCE SENTENCE TO DESCRIBE WHAT THIS PR DOES. -->
   
   Fix sector clockwise when previous data is 0.
   
   ### Fixed issues
   
   - #15517
   
   
   ## Details
   
   ### Before: What was the problem?
   
   If old data is 0, the sector will be anti-clockwise.
   
   
   ### After: How is it fixed in this PR?
   
   If old data is 0, the sector will be clockwise.
   
   
   
   ## 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
   
   - test/bar-polar-basic.html
   
   
   
   ## Others
   
   ### Merging options
   
   - [ ] Please squash the commits into a single one when merge.
   
   ### 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 a change in pull request #15589: fix(polar): wrong sector clockwise when previous data is 0 #15517

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #15589:
URL: https://github.com/apache/echarts/pull/15589#discussion_r703121959



##########
File path: src/chart/bar/BarView.ts
##########
@@ -238,6 +238,7 @@ class BarView extends ChartView {
             .add(function (dataIndex) {
                 const itemModel = data.getItemModel<BarDataItemOption>(dataIndex);
                 const layout = getLayout[coord.type](data, dataIndex, itemModel);
+                // console.log('get', layout.clockwise);

Review comment:
       This comment should be removed




-- 
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 a change in pull request #15589: fix(polar): wrong sector clockwise when previous data is 0 #15517

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #15589:
URL: https://github.com/apache/echarts/pull/15589#discussion_r703121959



##########
File path: src/chart/bar/BarView.ts
##########
@@ -238,6 +238,7 @@ class BarView extends ChartView {
             .add(function (dataIndex) {
                 const itemModel = data.getItemModel<BarDataItemOption>(dataIndex);
                 const layout = getLayout[coord.type](data, dataIndex, itemModel);
+                // console.log('get', layout.clockwise);

Review comment:
       This comment should be removed




-- 
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 #15589: fix(polar): wrong sector clockwise when previous data is 0 #15517

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #15589:
URL: https://github.com/apache/echarts/pull/15589#issuecomment-904340833


   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 commented on a change in pull request #15589: fix(polar): wrong sector clockwise when previous data is 0 #15517

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #15589:
URL: https://github.com/apache/echarts/pull/15589#discussion_r700694369



##########
File path: src/chart/bar/BarView.ts
##########
@@ -750,7 +750,7 @@ const elementCreator: {
         // direction. Notice that if clockwise is true (by default), the sector
         // will always draw clockwisely, no matter whether endAngle is greater
         // or less than startAngle.
-        const clockwise = layout.startAngle < layout.endAngle;
+        const clockwise = layout.startAngle <= layout.endAngle;

Review comment:
       It may still have issue when `angleAxis.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] Ovilia merged pull request #15589: fix(polar): wrong sector clockwise when previous data is 0 #15517

Posted by GitBox <gi...@apache.org>.
Ovilia merged pull request #15589:
URL: https://github.com/apache/echarts/pull/15589


   


-- 
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 #15589: fix(polar): wrong sector clockwise when previous data is 0 #15517

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #15589:
URL: https://github.com/apache/echarts/pull/15589#issuecomment-917986083


   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