hling51325 commented on a change in pull request #9162: fix: #8962 
闭合多边形时,如果第一个值为NaN,导致最后值也为NaN,渲染不出连接线。
URL: https://github.com/apache/incubator-echarts/pull/9162#discussion_r224450506
 
 

 ##########
 File path: src/chart/radar/radarLayout.js
 ##########
 @@ -38,8 +39,19 @@ export default function (ecModel) {
 
         data.each(function (idx) {
             // Close polygon
-            points[idx][0] && points[idx].push(points[idx][0].slice());
+
+            var _idx = findFirstNotNaNPoint()
+  
+            // Copy the first actual point to the end of the array
+            _idx >= 0 && points[idx].push(points[idx][_idx].slice());
             data.setItemLayout(idx, points[idx]);
+
+            function findFirstNotNaNPoint(){
+                var _value = zrUtil.find(points[idx], function (point) {
 
 Review comment:
   thank for your very nice teach! I'm really new for git collaboration. I 
rebased my commits.
   but maybe we need some contributing guidelines? 
   I didn't actually thing, if I pass NaN value to render, connect line often 
disappear when I move mouse or hover point. i dont know what cause the bug yet. 
I will try to do it
   
   ps: very like your video , i can't wait for next.

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