Skip to content
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

Always include the very first and last points for fills #3696

Merged
merged 2 commits into from
Apr 1, 2019

Conversation

etpinard
Copy link
Contributor

... during the line-decimation algo - fixes #3147

cc @plotly/plotly_js

... during the line-decimation algo
@etpinard etpinard added bug something broken status: reviewable labels Mar 29, 2019
@@ -0,0 +1,21 @@
{
"data": [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which looks like:

image

on master.

@antoinerg
Copy link
Contributor

Thanks for the fix @etpinard !

💃

@@ -387,7 +391,9 @@ module.exports = function linePoints(d, opts) {

clusterRefDist = ptDist(clusterHighPt, clusterStartPt);

if(clusterRefDist < getTolerance(clusterHighPt, nextPt) * minTolerance) continue;
// #3147 - always include the very first and last points for fills
if(!(fill && (pti === 0 || len - pti === 1)) &&
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never seen pti === len - 1 written quite that way 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that was weird, fixed in 9e8c3e9

@archmoj
Copy link
Contributor

archmoj commented Apr 1, 2019

💃

@etpinard etpinard merged commit 6ebffbd into master Apr 1, 2019
@etpinard etpinard deleted the line-decimation-fill-fix branch April 1, 2019 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpect fill connection rendering with extreme values
4 participants