Ovilia commented on code in PR #18820:
URL: https://github.com/apache/echarts/pull/18820#discussion_r1250041815


##########
src/chart/pie/pieLayout.ts:
##########
@@ -24,6 +24,8 @@ import GlobalModel from '../../model/Global';
 import ExtensionAPI from '../../core/ExtensionAPI';
 import PieSeriesModel from './PieSeries';
 import { SectorShape } from 'zrender/src/graphic/shape/Sector';
+import { normalizeRadian } from 'zrender/src/contain/util';

Review Comment:
   Please fix this lint problem



##########
src/chart/pie/pieLayout.ts:
##########
@@ -91,7 +93,10 @@ export default function pieLayout(
 
         const { cx, cy, r, r0 } = getBasicPieLayout(seriesModel, api);
 
-        const startAngle = -seriesModel.get('startAngle') * RADIAN;
+        let startAngle = -seriesModel.get('startAngle') * RADIAN;
+        let endAngle = startAngle - PI2;
+
+        const endAngleModel = seriesModel.get('endAngle');

Review Comment:
   I would suggest:
   
   ```ts
   let endAngle = seriesModel.get('endAngle'`);
   endAngle = endAngle === 'auto' ? startAngle - PI2 : -endAngle * RADIAN;
   



##########
src/chart/pie/pieLayout.ts:
##########
@@ -91,7 +93,10 @@ export default function pieLayout(
 
         const { cx, cy, r, r0 } = getBasicPieLayout(seriesModel, api);
 
-        const startAngle = -seriesModel.get('startAngle') * RADIAN;
+        let startAngle = -seriesModel.get('startAngle') * RADIAN;
+        let endAngle = startAngle - PI2;
+
+        const endAngleModel = seriesModel.get('endAngle');

Review Comment:
   The result of `seriesModel.get('endAngle')` should not be named as 
`xxxModel` because it's not a model.



-- 
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-unsubscr...@echarts.apache.org

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