Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2k
Fix color clustering#2377
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
Uh oh!
There was an error while loading. Please reload this page.
Fix color clustering #2377
Changes from all commits
5de6918ce01ea720559c07c944c94fada5687b22b264f112ff2e80a71154589d604a7695322107cb3295ba40db920c3a00eae6da2f8b4e5248e11240e746bfFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -779,9 +779,9 @@ function plot(container, subplot, cdata) { | ||
| } | ||
| // fill requires linked traces, so we generate it's positions here | ||
| if(scene.fill2d) { | ||
| scene.fillOptions.forEach(function(fillOptions, i) { | ||
| scene.fillOptions = scene.fillOptions.map(function(fillOptions, i) { | ||
| var cdscatter = cdata[i]; | ||
| if(!fillOptions || !cdscatter || !cdscatter[0] || !cdscatter[0].trace) return; | ||
| if(!fillOptions || !cdscatter || !cdscatter[0] || !cdscatter[0].trace) return null; | ||
| var cd = cdscatter[0]; | ||
| var trace = cd.trace; | ||
| var stash = cd.t; | ||
| @@ -861,6 +861,8 @@ function plot(container, subplot, cdata) { | ||
| fillOptions.opacity = trace.opacity; | ||
| fillOptions.positions = pos; | ||
| return fillOptions; | ||
| ||
| }); | ||
| scene.fill2d.update(scene.fillOptions); | ||
| @@ -945,7 +947,7 @@ function plot(container, subplot, cdata) { | ||
| scene.select2d = createScatter(layout._glcanvas.data()[1].regl, {clone: scene.scatter2d}); | ||
| } | ||
| if(scene.scatter2d) { | ||
| if(scene.scatter2d && scene.selectBatch && scene.selectBatch.length) { | ||
| // update only traces with selection | ||
| scene.scatter2d.update(scene.unselectedOptions.map(function(opts, i) { | ||
| return scene.selectBatch[i] ? opts : null; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "data": [{ | ||
| "type": "scattergl", | ||
| "mode": "lines", | ||
| "x": [1, 2, 3], | ||
| "y": [1, 2, 1] | ||
| }], | ||
| "layout": { | ||
| "dragmode": "select", | ||
| "showlegend": false, | ||
| "width": 400, | ||
| "height": 400 | ||
| } | ||
| } |
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.
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.
Great idea - I bet we'll find other places this should be used too.