BigFatDog / parcoords-es

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

Flipped axes have empty brushes #60

Open joshhjacobson opened 5 years ago

joshhjacobson commented 5 years ago

When an axis is upside down, regardless of whether it was flipped by double-clicking the title or with pc.flipAxes, brushing on that axis causes all polylines to disappear. However, if the axis is flipped back to its normal orientation, brushing works as expected. Interestingly, there is no console error...

Here is a quick screencast to illustrate the issue: flip_broken

arif-hanif commented 5 years ago

I have the same issue, is there any resolution

arif-hanif commented 5 years ago

anyone working on this or should i give it a shot?

joshhjacobson commented 5 years ago

@arif-hanif I would be great if you could give it a shot!

solidchu commented 3 years ago

number: function number(d, p, dimension) { if (typeof config.dimensions[p].yscale.bandwidth === 'function') { // if it is ordinal return extents[dimension][0] <= config.dimensions[p].yscale(d[p]) && config.dimensions[p].yscale(d[p]) <= extents[dimension][1]; } else {
if (extents[dimension][0]>extents[dimension][1]) return extents[dimension][1] <= d[p] && d[p] <= extents[dimension][0];
else return extents[dimension][0] <= d[p] && d[p] <= extents[dimension][1]; }

I found the problem. When the flip of axes, the extents[dimension][0] and [1] are reversed. So, if you change the code as like above, it is fixed.