-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Regl-based scattergl and scatterpolargl traces #2258
Conversation
... not sure why this thing fails on older versions of Chrome. Manually testing this on Browserstack produces the correct result.
... in compare px test, so that they don't conflict with regl-based scattergl.
... not sure why they pass previously, as both tests have assert small displacements that don't result in relayout to equal the base ranges AFTER modifying it with large-enough displacements.
... by making 'gd' the first argument, some subplot object the 2nd and the module calcdata the 3rd.
src/traces/scattergl/index.js
Outdated
@@ -561,7 +561,7 @@ function sceneUpdate(container, subplot) { | |||
if(scene.fill2d) scene.fill2d.update(opts); | |||
if(scene.scatter2d) scene.scatter2d.update(opts); | |||
if(scene.line2d) scene.line2d.update(opts); | |||
if(scene.error2d) scene.error2d.update([].push.apply(opts, opts)); | |||
if(scene.error2d) scene.error2d.update(opts.concat(opts)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see it fixes #2259 (comment)
Thanks.
src/traces/scattergl/index.js
Outdated
xa.p2c(xpx - MAXDIST), ya.p2c(ypx + MAXDIST), | ||
xa.p2c(xpx + MAXDIST), ya.p2c(ypx - MAXDIST) | ||
Math.min(xl, xr), Math.min(yl, yr), | ||
Math.max(xl, xr), Math.max(yl, yr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this fix?
... which should make things more robust and lead to less intermittent ci failures
... this does help a little, those tests appear to pass more often on ci, but this doesn't work 100% of the time. Something in a suite that get executed before (before 'polar' alphabetically) must not be cleaning up correctly.
- now part of the open items (unfortunately) in: #2255
This PR is a big one 💪 🚀 🚨
About 99.99% of it is the fruit of @dy 's 6-month worth of work. @dy rewrote our
scattergl
trace type usingregl
. In brief,scattergl
traces are now drawn in a single canvas -- no matter how many subplots there are on the graphs -- that sits above cartesian SVG axes. Reusing the SVG axes logic fixed about 10 bugs by itself. Plotting in a single canvas improves performance for multi-subplot graphs immensely as well as removing those annoying too many active WebGL contexts warnings. For more info on our new regl-basedscattergl
trace type, see #1869. For the sake of brevity, all that work was squashed into a single commit b64928dThe remaining 0.01% of this PR adds a new trace type:
scatterpolargl
which, as the name suggests, is a scatter trace type that'a plotted on polar subplots using WebGL. This new trace type doesn't bring much new code into the library, it simply combines logic fromscattergl
andscatterpolar
on top of polar (SVG) subplots from #2200.