flip axes syntax?
joshhjacobson opened this issue · 1 comments
Hi,
I'm wondering what the correct syntax to flip an individual axis or set of axes is? In the original parallel-coordinates library, it went something like this:
pc.flipAxes(["x", "y"]);
but when I try that code here, there is no effect. I noticed that the flipAxes
syntax is found in the sideEffects.js
file, but there is another file in the api called flip.js
. The following does work, but only for one axis:
pc.flip(["x"])
When I try to apply it to more than one axis (i.e. pc.flip(["x", "y"])
), I get the following error:
TypeError: Cannot read property 'yscale' of undefined
at Function.flip (parcoords.esm.js:2898)
If you can point me in the direction of a solution, I may be able to implement this and submit a pull request. However, if it's a quick fix and you think it would be faster to take care of it yourself, that would be great too. Let me know!
Happy holidays,
Josh
Update: After some investigation, I learned that the correct syntax is true to the original parallel-coordinates syntax. It should be
pc.flipAxes(["x", "y"]);
There was no effect before due to an incongruity with the axis
variable being passed to flipAxes
in sideEffects.js
which left the function body of flipAxes
empty when bundled. This has been remedied in #59.