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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regl-based scattergl and scatterpolargl traces #2258

Merged
merged 39 commits into from Jan 18, 2018

Conversation

Projects
None yet
3 participants
@etpinard
Copy link
Member

commented Jan 17, 2018

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 using regl. 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-based scattergl trace type, see #1869. For the sake of brevity, all that work was squashed into a single commit b64928d

The 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 from scattergl and scatterpolar on top of polar (SVG) subplots from #2200.

etpinard and others added some commits Dec 12, 2017

skip gl2d visibility toggle test on CI
... not sure why this thing fails on older versions
    of Chrome. Manually testing this on Browserstack
    produces the correct result.
sort pointcloud and heatmapgl mock
... in compare px test, so that they don't conflict
    with regl-based scattergl.
fixup gl2d zoombox tests
... 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.
make Plots.generalUpdatePerTraceModule consistent w/ Cartesian.plot
... by making 'gd' the first argument, some subplot object the 2nd
    and the module calcdata the 3rd.
@@ -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));

This comment has been minimized.

Copy link
@etpinard

etpinard Jan 18, 2018

Author Member

what does this fix?

This comment has been minimized.

Copy link
@etpinard

etpinard Jan 18, 2018

Author Member

I see it fixes #2259 (comment)

Thanks.

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)

This comment has been minimized.

Copy link
@etpinard

etpinard Jan 18, 2018

Author Member

what does this fix?

etpinard added some commits Jan 18, 2018

make gl2d drag test use assets/drag
... which should make things more robust and lead to less
    intermittent ci failures
attempt for making polar drag test more robust
... 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.
skip polar drag test on CI (for now)
- now part of the open items (unfortunately) in:
  #2255
@alexcjohnson

This comment has been minimized.

Copy link
Contributor

commented Jan 18, 2018

@dy @etpinard you get a whole troupe for this one
馃拑 馃拑 馃拑 馃拑
馃拑 馃拑 馃拑 馃拑
馃拑 馃拑 馃拑 馃拑
馃拑 馃拑 馃拑 馃拑

@etpinard etpinard merged commit 46483f2 into master Jan 18, 2018

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@etpinard etpinard deleted the regl-scattergl-scatterpolargl branch Jan 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.