-
vizulyJune 29, 2016 at 5:50 am #6273
Hello DC,
Great question. You would think this could be a relatively simple change, but it isn’t.
The measurements taken for the layout are really based on a horizontal spread. That being said it is not impossible to do what you want, but it will require a bit of tweaking to the src/viz/weightedtree.js file.
Here is a great link to help get you started: http://bl.ocks.org/d3noob/8326869
You will want to start by looking at three areas in src/viz/weightedtree.js
1. Initializing the
d3.svg.diagonal().projection(function (d) { return [d.x,d.y] });
2. Changing related code in themeasure()function for setting the appropriate width/height of thetree.nodeSize()and other related measures.
3. Changing the code in theupdate()function so it translates the nodes to the correct position usingd.x,d.yinstead ofd.y,d.x. And also changing how the labels are laid out.So while not impossible to do, there is no simply parameter you can change that will do it automatically.
– Tom
You must be logged in to reply to this topic.
© 2026 — vizuly.io