Repository navigation
support rangebreaks in gl2d traces #4630
Description
Activity
This one will be tricky, as the linear relationship between the data-space and the pixel-space is at the heart of the regl modules (i.e.
regl-scatter2d,regl-line2dandregl-error2d) used byscattergl.The regl modules compute the data to pixel map in the shaders. For example, for
regl-scatter2d:making redraws from axis range updates is blazing fast. For example, on drag:
plotly.js/src/plots/cartesian/dragbox.js
Lines 801 to 813 in c5173e1
if(hasScatterGl) { for(i = 0; i < subplots.length; i++) { sp = plotinfos[subplots[i]]; xa = sp.xaxis; ya = sp.yaxis; if(sp._scene) { var xrng = Lib.simpleMap(xa.range, xa.r2l); var yrng = Lib.simpleMap(ya.range, ya.r2l); sp._scene.update({range: [xrng[0], yrng[0], xrng[1], yrng[1]]}); } } }
One could probably make part of data-to-pixel conversion on the JS side and then reuse the same shader code, but I worry that this might lead to a large performance lost.
I'm thinking that passing the piecewise offsets (
ax._Bas added in #4614) as part of a buffer down to the shader might be the way to go. That said, addingif(ax.breaks)statement in the shader might impact performance. We should be very careful here. Please use https://codepen.io/etpinard/pen/BVdxoY to test (1) first draw, (2) pan and (3) selection perf at 1e5 and 1e6 points.- changed the title
[-]Axis breaks on date axis with scattergl[/-][+]support rangebreaks in gl2d traces[/+]on Jun 8, 2020 Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson
It could be of interest to handle
axisbreaks on adateaxis withscattergl(webGL) similar to #1382 which was dedicated for SVG traces on thecartesiansubplots.