-
-
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
Point cluster dev #2499
Point cluster dev #2499
Conversation
@etpinard is the test-image build fail caused by scattergl update? Looks like something other causes that. |
you mean this: see -> #2493 (comment) |
Looks like is also having issues in nw.js @dfcreative Can you try setting up https://gist.github.com/etpinard/d27a44bd5dbee5490f20 ? You don't anything docker related. Just make sure to use |
src/traces/scatterpolargl/index.js
Outdated
@@ -106,6 +106,12 @@ function plot(container, subplot, cdata) { | |||
if(options.line && !scene.line2d) scene.line2d = true; | |||
if((options.errorX || options.errorY) && !scene.error2d) scene.error2d = true; | |||
|
|||
stash.tree = cluster(positions); | |||
|
|||
if(options.marker) { |
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.
this should probably be options.marker && count >= TOO_MANY_POINTS
like in scattergl/convert.js
@dfcreative nice! You got the tests to ✅ I noticed a few things by looking at the diff:
|
@dfcreative I'm noticing that drag performance slows down after toggling Moreover, with var gd = document.getElementById('graph')
var x = []
var y = []
var ms = []
var N = 1e6
var i = 0
for(; i < N; i++) {
x.push(Math.random())
y.push(Math.random())
ms.push(i % 2 ? 20 : 10)
}
console.time('plot')
Plotly.newPlot(gd, [{
type: 'scattergl',
mode: 'markers',
x: x,
y: y,
marker: {size: ms}
}], {
dragmode: 'closest',
//xaxis: {range: [-0.1, 2.2]},
//yaxis: {range: [-0.1, 1.1]}
}, {scrollZoom: true}) selection is slower than on |
... Oh and we should make sure the new |
Fixed. Although that affects only data layering order, for polar plots that is a bit less actual.
That is not clustering, that is adjusted shader behavior in case of no-border gl-vis/regl-scatter2d@023c421. It used to add thin black pixel outline instead of keeping the point color, now that "antialias" has the point color.
Thanks, fixed. In fact it supports multiple colors now in IE and works even better.
Working on that. |
…races Fix scattergl unselected marker opacity for array marker opacity traces
Ok, with the latest commit selection should work almost as fast as possible, init time is ok, no tree overcalculation and observable memory leaks. |
package.json
Outdated
"mapbox-gl": "0.44.1", | ||
"math-log2": "^1.0.1", |
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.
did this get used?
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.
Whoops.
Well this is amazing! Performance off the latest commit is nothing short of spectacular. Great job @dfcreative 🎉 All my concerns have been addressed. Now, would you mind publishing a major version of |
Ok. Well-earned 💃 Let's merge this thing. |
supersedes #2493