Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layouts should have orientations. #63

Open
18 tasks
mbostock opened this issue Oct 27, 2016 · 4 comments
Open
18 tasks

Layouts should have orientations. #63

mbostock opened this issue Oct 27, 2016 · 4 comments
Assignees
Milestone

Comments

@mbostock
Copy link
Member

mbostock commented Oct 27, 2016

Currently, you have to do some tedious dancing to change the orientation of d3.cluster, d3.tree or d3.partition, for example swapping x ↔︎ y and width ↔︎ height. It’d be nice if these layouts supported orientations, so that it was trivial to replace the default top-to-bottom tree with a bottom-to-top tree or a left-to-right, etc.

  • d3.partition = d3.partitionDown
  • d3.partitionUp
  • d3.partitionDown
  • d3.partitionLeft
  • d3.partitionRight
  • d3.partitionRadial
  • d3.tree = d3.treeDown
  • d3.treeUp
  • d3.treeDown
  • d3.treeLeft
  • d3.treeRight
  • d3.treeRadial
  • d3.cluster = d3.clusterDown
  • d3.clusterUp
  • d3.clusterDown
  • d3.clusterLeft
  • d3.clusterRight
  • d3.clusterRadial
@mbostock mbostock self-assigned this Oct 27, 2016
@mbostock mbostock modified the milestone: 2 Oct 27, 2016
@mbostock
Copy link
Member Author

Also, radial orientations.

@ixxie
Copy link

ixxie commented Aug 15, 2018

We are trying to flip our d3.cluster at the moment; until this feature is implemented it may be nice to have an example of this sort of thing document, perhaps here (where google landed me)?

@Misiu
Copy link

Misiu commented Sep 19, 2018

@ixxie something like this?

@curran
Copy link

curran commented Oct 23, 2019

The dancing is not really that tedious IMO. Orientation feels like it does not need to be core functionality.

I wonder if it might be possible to introduce generic transforms that could be applied as a separate step, after computing the original layouts. That way the pain point would be adressed, while introducing less new API surface area.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants