8000 multiple selections on parcoords axes by monfera · Pull Request #2415 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

multiple selections on parcoords axes #2415

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

Merged
merged 26 commits into from
Mar 21, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9208cc3
- factored out brushing
monfera Feb 5, 2018
40b0c2b
- full refactor of shader code, DRY, optimizations etc.
monfera Mar 3, 2018
7f507c3
remove constraintrange from parcoords mocks
alexcjohnson Mar 6, 2018
d25d261
tweak the parcoords constraint grabber ranges
alexcjohnson Mar 9, 2018
367e294
parcoords constraint cleanup
alexcjohnson Mar 12, 2018
1030542
dimension.multiselect boolean attr
alexcjohnson Mar 12, 2018
c046397
Merge branch 'master' into parcoords-multiselect-squashed
alexcjohnson Mar 12, 2018
a4f4a5f
info_array dimensions='1-2'
alexcjohnson Mar 13, 2018
a78db76
finalize multiselect functionality
alexcjohnson Mar 15, 2018
01ba11e
:hocho: fdescribe
alexcjohnson Mar 15, 2018
68e9e48
lint axisbrush
alexcjohnson Mar 15, 2018
cb00901
fail -> failTest - fail is a jasmine global
alexcjohnson Mar 15, 2018
f2690ac
fix one more filter bug, refactor parcoords test to hopefully reuse c…
alexcjohnson Mar 15, 2018
ec44922
refactor more of parcoords test to use Plotly.react
alexcjohnson Mar 15, 2018
352a884
parentElement -> parentNode
alexcjohnson Mar 15, 2018
57085e1
shorten parcoords snap tweening during tests
alexcjohnson Mar 15, 2018
fff668a
@flaky on ordinal constraint snap test
alexcjohnson Mar 15, 2018
6fe2d79
I give up... @noCI my new tests
alexcjohnson Mar 15, 2018
2911ae6
:hocho: parcoords memory leak
alexcjohnson Mar 16, 2018
fa1a436
parcoords create/update pattern
alexcjohnson Mar 16, 2018
0e75c5a
parcoords test cleanup
alexcjohnson Mar 16, 2018
a7bd686
click to select an ordinal value
alexcjohnson Mar 17, 2018
6432b89
cleanup, and remove some obsolete code
alexcjohnson Mar 17, 2018
03d8779
tweaked parcoords mocks
alexcjohnson Mar 19, 2018
f147644
Revert "tweaked parcoords mocks"
alexcjohnson Mar 19, 2018
c3cc927
fix bug introduced in cleanup
alexcjohnson Mar 19, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
🔪 parcoords memory leak
naive solution, cleaner one coming next, just want to see if this
lets our CI tests run
  • Loading branch information
alexcjohnson committed Mar 16, 2018
commit 2911ae699a82b173be63be6f241d2f03fb9326a3
25 changes: 12 additions & 13 deletions src/traces/parcoords/lines.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function makePoints(sampleCount, dimensionCount, dimensions, color) {
return points;
}

function makeVecAttr(sampleCount, points, vecIndex) {
function makeVecAttr(regl, sampleCount, points, vecIndex) {

var i, j, k;
var pointPairs = [];
Expand All @@ -157,18 +157,16 @@ function makeVecAttr(sampleCount, points, vecIndex) {
}
}

return pointPairs;
return regl.buffer(pointPairs);
}

function makeAttributes(sampleCount, points) {

var vecIndices = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
var vectors = vecIndices.map(function(vecIndex) {return makeVecAttr(sampleCount, points, vecIndex);});
function makeAttributes(regl, sampleCount, points) {

var attributes = {};
vectors.forEach(function(v, vecIndex) {
attributes['p' + vecIndex.toString(16)] = v;
});

for(var i = 0; i < 16; i++) {
attributes['p' + i.toString(16)] = makeVecAttr(regl, sampleCount, points, i);
}

return attributes;
}
Expand Down Expand Up @@ -206,11 +204,11 @@ module.exports = function(canvasGL, d) {

var panelCount = initialPanels.length;

var points = makePoints(sampleCount, dimensionCount, initialDims, color);
var attributes = makeAttributes(sampleCount, points);

var regl = d.regl;

var points = makePoints(sampleCount, dimensionCount, initialDims, color);
var attributes = makeAttributes(regl, sampleCount, points);

var mask, maskTexture;

var paletteTexture = regl.texture({
Expand Down Expand Up @@ -509,7 +507,8 @@ module.exports = function(canvasGL, d) {
function destroy() {
canvasGL.style['pointer-events'] = 'none';
paletteTexture.destroy();
maskTexture.destroy();
if(maskTexture) maskTexture.destroy();
for(var k in attributes) attributes[k].destroy();
}

return {
Expand Down
3 changes: 2 additions & 1 deletion src/traces/parcoords/parcoords.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function model(layout, d, i) {
tickFont = trace.tickfont,
rangeFont = trace.rangefont;

var lines = Lib.extendDeep({}, line, {
var lines = Lib.extendDeepNoArrays({}, line, {
color: lineColor.map(domainToUnitScale({
values: lineColor,
range: [line.cmin, line.cmax],
Expand Down Expand Up @@ -477,6 +477,7 @@ module.exports = function(root, svg, parcoordsLineLayers, styledData, layout, ca
parcoordsLineLayer
.filter(function(d) {return !!d.viewModel;})
.each(function(d) {
if(d.lineLayer) d.lineLayer.destroy();
d.lineLayer = lineLayerMaker(this, d);
d.viewModel[d.key] = d.lineLayer;
d.lineLayer.render(d.viewModel.panels, !d.context);
Expand Down
0