ssthouse commented on a change in pull request #15095:
URL: https://github.com/apache/echarts/pull/15095#discussion_r646463595



##########
File path: src/chart/pie/PieSeries.ts
##########
@@ -170,7 +170,13 @@ class PieSeriesModel extends SeriesModel<PieSeriesOption> {
 
         const valueList: number[] = [];
         data.each(data.mapDimension('value'), function (value: number) {
-            valueList.push(value);
+            // handle minue value condition: teat minus value as 0 when 
calculation percent
+            if (!isNaN(value) && value < 0) {
+                valueList.push(0);
+            }
+            else {
+                valueList.push(value);
+            }

Review comment:
       fixed




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to