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

Fix scattergl mising points plot and react #4323

Merged
merged 3 commits into from
Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
66 changes: 22 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@
"ndarray": "^1.0.18",
"ndarray-fill": "^1.0.2",
"ndarray-homography": "^1.0.0",
"point-cluster": "^3.1.4",
"point-cluster": "^3.1.8",
"polybooljs": "^1.2.0",
"regl": "^1.3.11",
"regl-error2d": "^2.0.8",
"regl-line2d": "^3.0.15",
"regl-scatter2d": "^3.1.5",
"regl-splom": "^1.0.7",
"regl-scatter2d": "^3.1.7",
"regl-splom": "^1.0.8",
"right-now": "^1.0.0",
"robust-orientation": "^1.1.3",
"sane-topojson": "^4.0.0",
Expand Down
7 changes: 1 addition & 6 deletions src/traces/scattergl/calc.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,7 @@ module.exports = function calc(gd, trace) {
if(opts.line && !scene.line2d) scene.line2d = true;
if((opts.errorX || opts.errorY) && !scene.error2d) scene.error2d = true;
if(opts.text && !scene.glText) scene.glText = true;

// FIXME: organize it in a more appropriate manner, probably in sceneOptions
// put point-cluster instance for optimized regl calc
if(opts.marker) {
opts.marker.snap = stash.tree || TOO_MANY_POINTS;
}
if(opts.marker) opts.marker.snap = len;
Copy link
Contributor

Choose a reason for hiding this comment

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

Ha - there is it!

That's the piece I was missing. Thank you very much @archmoj - this is probably the best bug fix for the library in 2019.


scene.lineOptions.push(opts.line);
scene.errorXOptions.push(opts.errorX);
Expand Down
Binary file added test/image/baselines/gl2d_clustering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading