100pah commented on a change in pull request #8997: Pie chart adds filterValue 
parameter
URL: https://github.com/apache/incubator-echarts/pull/8997#discussion_r229185836
 
 

 ##########
 File path: src/chart/pie/PieView.js
 ##########
 @@ -319,7 +327,8 @@ var PieView = ChartView.extend({
         );
 
         var selectedMode = seriesModel.get('selectedMode');
-
+        var valueDim = data.mapDimension('value');
+        data._sum = data.getSum(valueDim) || 0;
 
 Review comment:
   By convention, a property name prefixed by a single `'_'` represents the 
property is a "private member" of an class. We should not add other that kind 
of properties (`_xxx`) outside the class  definition dynamically. Otherwise, 
that probably confuse the code reader and might overwrite the inner private 
members with the same name. 
   
   If we need save the `sum` here, it's OK to to save it to `this`, because in 
this module we have the legal control of `this`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to