Skip to content

Commit 3c34014

Browse files
committed
Add check for greater than one point to scatter fill
1 parent 3f9fe05 commit 3c34014

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/traces/scatter/plot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
224224
else if(line.shape === 'spline') {
225225
pathfn = revpathbase = function(pts) {
226226
var pLast = pts[pts.length - 1];
227-
if(pts.length > 2 && pts[0][0] === pLast[0] && pts[0][1] === pLast[1]) {
227+
if(pts.length > 1 && pts[0][0] === pLast[0] && pts[0][1] === pLast[1]) {
228228
// identical start and end points: treat it as a
229229
// closed curve so we don't get a kink
230230
return Drawing.smoothclosed(pts.slice(1), line.smoothing);

0 commit comments

Comments
 (0)