Skip to content

On-par autorange for scattergl #2404

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 9 commits into from
Feb 28, 2018
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
🔪 TODOs
  • Loading branch information
etpinard committed Feb 28, 2018
commit 01a8443b2aa3b2836457cf55b1ae2cd07502abc9
3 changes: 0 additions & 3 deletions src/traces/scattergl/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,10 @@ function calc(gd, trace) {

// we need hi-precision for scatter2d,
// regl-scatter2d uses NaNs for bad/missing values
//
// TODO should this be a Float32Array ??
var positions = new Array(count2);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dfcreative could we set up positions with a Float32Array here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Float32 is not enough precision for some timedate and precise linear/etc ranges.

for(i = 0; i < count; i++) {
xx = x[i];
yy = y[i];
// TODO does d2c output any other bad value as BADNUM ever?
positions[i * 2] = xx === BADNUM ? NaN : xx;
positions[i * 2 + 1] = yy === BADNUM ? NaN : yy;
}
Expand Down