syntagmatic / parallel-coordinates

A d3-based parallel coordinates plot in canvas. This library is no longer actively developed.
http://syntagmatic.github.com/parallel-coordinates/
Other
511 stars 211 forks source link

How to update the brushed portion after an axis is flipped? #78

Open TharinduDR opened 9 years ago

TharinduDR commented 9 years ago

When a certain portion of an axis is brushed and if that axis is flipped, the bushed portion would not get updated. For an example in following figures,

  1. Brushed content before flipping the axis parallel coordinates 26
  2. After that brushed axis is flipped, in this figure it is weight,(the brushed potion won't update with the flipping) parallel coordinates 27

I use this function to flip the axis,

function flipaxis(dimension) { parcoords.svg.selectAll(".dimension") .style("font-weight", "normal") .filter(function(d) { return d == dimension; }) .style("font-weight", "bold")

parcoords.flip(dimension).updateAxes().render(); }

bbroeksema commented 9 years ago

That's something which is high on my list to get fixed. It relates to the problem of brushes getting lost on resize(). I started working on that at some point but didn't get to fix that yet. I hope to get this done somewhere before the end of this year.

In the meanwhile, you could "work-around" this by calling brushReset() either before or after the flip. Obviously, this results in the brush getting lost, but at least that's slightly less awkward than what you see in above images.

bbroeksema commented 9 years ago

Just to give you an update. I have a local patch which fixes this for 1D strums (i.e. the problem you describe). I want to push through now though and also fix it for 2D-strums before I push. This needs still a bit of work, but should be done somewhere in the next two weeks.

BroHammie commented 8 years ago

@bbroeksema Your commit fixes the 1D and 1D-multi but what were you planning to do for the 2D strums? Would you leave the previously drawn strum and then highlight what it included after the axis flip?

varvaratou commented 8 years ago

@bbroeksema Was ever a PR created for your work on updating brushes upon resizing and flipping axis? If not, what more needs to be done?