2

In my application, you can visualize sankey charts for custom input. Some of the input consists only of 5 nodes, some other input may consist of 50 nodes. The problem is, that I have to set a fixed width and height for the sankey chart on creation.

    var svg = d3.select(elementId).append("svg")
        .attr("width", 300)
        .attr("height", 300)

Is there a way to set the size to a minimum size that is required to show the diagram without overlapping nodes? Or is there an option to ask the sankey diagram how many rows and columns it will layout to calculate that width based on the node widht/height and the padding?

Any help is appreciated, thanks!

Andreas
  • 21
  • 1

0 Answers0