10000 Fix scatter fill with isolated endpoints by rreusser · Pull Request #1933 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Fix scatter fill with isolated endpoints #1933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 7, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add check for greater than one point to scatter fill
  • Loading branch information
rreusser committed Aug 7, 2017
commit 3c3401411a973cc5c712a3c5373de2bcbff567ad
2 changes: 1 addition & 1 deletion src/traces/scatter/plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
else if(line.shape === 'spline') {
pathfn = revpathbase = function(pts) {
var pLast = pts[pts.length - 1];
if(pts.length > 2 && pts[0][0] === pLast[0] && pts[0][1] === pLast[1]) {
if(pts.length > 1 && pts[0][0] === pLast[0] && pts[0][1] === pLast[1]) {
// identical start and end points: treat it as a
// closed curve so we don't get a kink
return Drawing.smoothclosed(pts.slice(1), line.smoothing);
Expand Down
0