deltoss / d3-mitch-tree

D3 plugin to create stunning interactive tree visualisations.
MIT License
82 stars 42 forks source link

Can you reduce spacing between groups of 'children' in boxed tree mode? #129

Open nmg196 opened 2 years ago

nmg196 commented 2 years ago

Is there a way to reduce this distance without the boxes overlapping? This doesn't seem to be configurable.

image

I'm using "Advanced Example Expand All Nodes.html" but just with these extra settings to prevent overlapping of boxes on the right hand side:

    .getNodeSettings()
        .setSizingMode('nodeSize')
        .setVerticalSpacing(20)             
        .setHorizontalSpacing(50)
        .setTitleBoxHeight(30)
        .back()

Thanks! Nick

Bubbleshum commented 2 years ago

Had this issue, after scouring the code... found the solution. On the constructor set the sizing mode and can set the spacing here... new d3.mitchTree.boxedTree({nodeSettings: {verticalSpacing: 25, horizontalSpacing: 25, sizingMode: 'nodeSize'}})