0

Is there any way to calculate or get the optimal dimensions of D3.js vertical tree?

Another way to put my Question :-

It is supposed to take Height and Width in px for the tree but how can I make the Height and Width Dynamic so my tree is never cut?

var margin = {top: 40, right: 120, bottom: 20, left: 120},
width = 960 - margin.right - margin.left,
height = 500 - margin.top - margin.bottom;
var tree = d3.layout.tree()
    .size([height, width]);
Mehdi
  • 6,679
  • 1
  • 32
  • 41

0 Answers0