Ovilia commented on a change in pull request #9162: fix: #8962
闭合多边形时,如果第一个值为NaN,导致最后值也为NaN,渲染不出连接线。
URL: https://github.com/apache/incubator-echarts/pull/9162#discussion_r224324078
##########
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(){
Review comment:
Should be `function findFirstNotNaNPoint() {`
----------------------------------------------------------------
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]