Skip to content

Commit

Permalink
fix: apache#8962 闭合多边形时,如果第一个值为NaN,导致最后值也为NaN,渲染不出连接线。
Browse files Browse the repository at this point in the history
  • Loading branch information
usagiring committed Oct 3, 2018
1 parent 90696f7 commit 32d3eb7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/chart/radar/radarLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ export default function (ecModel) {

data.each(function (idx) {
// Close polygon
points[idx][0] && points[idx].push(points[idx][0].slice());

let index = points[idx].findIndex(([x, y]) => {
return !isNaN(x) && !isNaN(y)
})

index >= 0 && points[idx].push(points[idx][index].slice());
data.setItemLayout(idx, points[idx]);
});
});
Expand Down

0 comments on commit 32d3eb7

Please sign in to comment.