You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "linghaoSu (via GitHub)" <gi...@apache.org> on 2023/05/10 00:57:38 UTC

[GitHub] [echarts] linghaoSu opened a new pull request, #18604: fix(pie): display empty circle correctly

linghaoSu opened a new pull request, #18604:
URL: https://github.com/apache/echarts/pull/18604

   <!-- 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 ONE SENTENCE TO DESCRIBE WHAT THIS PR DOES. -->
   display empty correctly
   
   
   ### Fixed issues
   
   <!--
   - #xxxx: ...
   -->
   
   - https://github.com/apache/echarts/issues/18603
   
   ## Details
   
   
   ### Before: What was the problem?
   When showEmptyCircle is set to true, the empty circle is not shown
   <!-- DESCRIBE THE BUG OR REQUIREMENT HERE. -->
   
   https://github.com/apache/echarts/assets/56526981/3b2600e6-9b5d-4069-aa56-87b317806082
   
   
   <!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
   
   
   
   ### After: How does it behave after the fixing?
   
   <!-- THE RESULT AFTER FIXING AND A SIMPLE EXPLANATION ABOUT HOW IT IS FIXED. -->
   
   <!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
   
   <img width="1398" alt="image" src="https://github.com/apache/echarts/assets/56526981/c70dce02-6b0e-4d53-af20-60532db0d74c">
   
   
   ## Document Info
   
   One of the following should be checked.
   
   - [x] This PR doesn't relate to document changes
   - [ ] The document should be updated later
   - [ ] The document changes have been made in apache/echarts-doc#xxx
   
   
   
   ## Misc
   
   ### ZRender Changes
   
   - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
   
   ### Related test cases or examples to use the new APIs
   
   N.A.
   
   
   
   ## 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] plainheart commented on a diff in pull request #18604: fix(pie): display empty circle correctly

Posted by "plainheart (via GitHub)" <gi...@apache.org>.
plainheart commented on code in PR #18604:
URL: https://github.com/apache/echarts/pull/18604#discussion_r1189675349


##########
src/chart/pie/PieView.ts:
##########
@@ -259,7 +260,21 @@ class PieView extends ChartView {
             group.remove(this._emptyCircleSector);
         }
         // when all data are filtered, show lightgray empty circle
-        if (data.count() === 0 && seriesModel.get('showEmptyCircle')) {
+        // when data sum is zero and showEmptyCircle is true
+        // and roseType is not area, show empty circle
+        const isNeedShowEmptyCircle = (

Review Comment:
   This seems to be changing the behavior of `showEmptyCircle`. As per #15095, it's designed to show only when no data items or all items are filtered, instead of when sum is zero. 



-- 
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] linghaoSu closed pull request #18604: fix(pie): display empty circle correctly

Posted by "linghaoSu (via GitHub)" <gi...@apache.org>.
linghaoSu closed pull request #18604: fix(pie): display empty circle correctly
URL: https://github.com/apache/echarts/pull/18604


-- 
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] linghaoSu commented on a diff in pull request #18604: fix(pie): display empty circle correctly

Posted by "linghaoSu (via GitHub)" <gi...@apache.org>.
linghaoSu commented on code in PR #18604:
URL: https://github.com/apache/echarts/pull/18604#discussion_r1193916681


##########
src/chart/pie/PieView.ts:
##########
@@ -259,7 +260,21 @@ class PieView extends ChartView {
             group.remove(this._emptyCircleSector);
         }
         // when all data are filtered, show lightgray empty circle
-        if (data.count() === 0 && seriesModel.get('showEmptyCircle')) {
+        // when data sum is zero and showEmptyCircle is true
+        // and roseType is not area, show empty circle
+        const isNeedShowEmptyCircle = (

Review Comment:
   Sorry, I didn't notice this pr, I misunderstood the meaning of this attribute, I will close this pr and the related issue. also I found this [issue](https://github.com/apache/echarts/issues/16117) solves my problem



-- 
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 #18604: fix(pie): display empty circle correctly

Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on PR #18604:
URL: https://github.com/apache/echarts/pull/18604#issuecomment-1541088706

   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).


-- 
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