vizulyOctober 5, 2017 at 9:06 am #8063
Yes, there are two properties you can use to adjust the horizontal and vertical spacing.
tree.branchPadding(x) will let you set the vertical spacing between elements as a percentage of total height of tree where x = the percentage amount as float. i.e. tree.branchPadding(0.05) will try and space nodes vertically by 5% of total tree height. If you set x = -1 it will try and automatically space nodes vertically for you.
tree.fixedSpan(x) allows you to set a fixed pixel distance between nodes horizontal spacing. i.e. tree.fixedSpan(100) would lay the tree out with a 100 pixel distance between nodes horizontally. If you set x = -1 it will try to automatically set the horizontal node spacing based on the width of the tree.
You must be logged in to reply to this topic.
© 2021 — vizuly.io