Closed Sigfried closed 8 years ago
How are you calling flipAxis
?
pc.flipAxes(['month'])
Maybe it has to do with the ordering? In basic.html
the following code works.
var parcoords = d3.parcoords()("#example")
.data([
[0, -0, 0, 0, 0, 1],
[1, -1, 1, 2, 1, 1],
[2, -2, 4, 4, 0.5, 1],
[3, -3, 9, 6, 0.33, 1],
[4, -4, 16, 8, 0.25, 1]
])
.render()
.createAxes()
.flipAxes(['0']);
Are you calling it after createAxes
has been called? If that's the case, I can make sure to update the documentation.
I am calling it after everything else. But I might be screwing something else up because brushing and reordering aren't working on my chart even though I'm turning those on.
Ahh, are you including sylvester.js
and d3.svg.multibrush.js
?
Ah, no. I'll go get those.
... No. Something still screwed up. I'm in a react context and was using react-parallel-coordinates and brushing/reordering were working, but that uses an old version of parallel-coordinates, so I scrapped it.
On Fri, Apr 8, 2016 at 7:32 AM, c.p. notifications@github.com wrote:
Ahh, are you including sylvester.js and d3.svg.multibrush.js?
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/syntagmatic/parallel-coordinates/issues/294#issuecomment-207392578
I'm not sure what https://github.com/Git-me-outta-here/react-parallel-coordinates is doing to get brushing to work in react that I wasn't doing (though it isn't including sylvester and multibrush), but I'm back to using it (with a couple fixes to use the latest version of parallel-coordinates). Still not able to flipAxes.
I see now that the code is actually working, the yscale domain is getting flipped, but visibly on the chart nothing is happening, it appears unflipped.
Nevermind. I just have to call .render().createAxes() after calling .flip().
Glad you got it working! :)
Thanks!
I think there is a bug here:
https://github.com/syntagmatic/parallel-coordinates/blob/master/src/axis.js#L8
this
is undefined in this function, at least for me it is.