BigFatDog / parcoords-es

ES6 module of Syntagmatic's Parallel Coordinates
MIT License
62 stars 32 forks source link

brush arguments for external visibility #31

Closed timelyportfolio closed 6 years ago

timelyportfolio commented 6 years ago

@BigFatDog, as I thought more about this the commit comments https://github.com/BigFatDog/parcoords-es/commit/d95b853da22cb9c80f4d0e2905673ca2b1f773d8#r29660382 probably are not the best way to discuss new features :). Promoting this to a new issue will give us a better opportunity to discuss and track.

this call works perfectly internally within parallel-coordinates. I struggle though with determining externally which brush we are working with on('brushstart', ...) and on('brushend', ...). This example (with a modified old parallel-coordinates) demonstrates the objective. Would it cause any problems to change

events.call('brushstart', pc, config.brushed);

to

events.call('brushstart', pc, config.brushed, arguments);

which leverages https://github.com/d3/d3-brush/blob/master/src/brush.js#L286?? If we do this, then the second argument to pc.on('brushend', function(a, args) {} will be the arguments which contain dimension. I am happy to submit a pull if you agree this is worthwhile.

BigFatDog commented 6 years ago

I have gone through your pull request and have a question on API design.

We may discuss either here or in the pull request.

timelyportfolio commented 6 years ago

Thanks so much @BigFatDog. I will likely have other ideas over the next couple of months and am excited about helping as much as I can.

BigFatDog commented 6 years ago

You're welcome. I'm happy to see new ideas. See you then!

timelyportfolio commented 6 years ago

I just realized that categorical scales don't work. Will submit a pull with fix tonight.