Search code examples
reactjsd3.jstreemap

How to convert of D3.js code to react code


I want to use the d3 treemap layout in react .I have imported D3 in my react app . But I cannot use the d3 functions as it is . Find the code in this link codesandbox


Solution

  • Covert the D3 version to version 3.* and this code will render!

    https://codesandbox.io/s/fancy-waterfall-mpwr1?fontsize=14