I\'m trying to update some d3 code from v3 to version 4. I have a tree diagram using JSON data. The d3.v4 examples show how to convert tabular data (e.g. flare.csv) to hierarchi
You need to run d3.hierarchy on your data to get it ready for tree(). Stratify presumably runs hierarchy or is similar in some way. So change the appropriate line to: var root = d3.hierarchy(treeData[0]);