bkrem / react-d3-tree

:deciduous_tree: React component to create interactive D3 tree graphs
https://bkrem.github.io/react-d3-tree
MIT License
1.09k stars 270 forks source link

baseNodes translated to infinite => `transform="translate(2744000,280)"` #302

Open baptisteArno opened 4 years ago

baptisteArno commented 4 years ago

Are you reporting a bug, or opening a feature request?

A bug

What is the actual behavior/output?

I'm computing a tree on component load but it is weirdly rendered : CleanShot 2020-06-11 at 15 17 10

What is the behavior/output you expect?

CleanShot 2020-06-11 at 15 20 45

I succeeded in having the expected behavior because I stringified what my function computed for the tree and just paste it in my code. I made sure the 2 tree objects are equal (with deep-equal lib). What could be wrong here?

What version of react-d3-tree are you using?

1.16.1

baptisteArno commented 4 years ago

UPDATE

if my function returns return JSON.parse(JSON.stringify(newTree)); it succeeds rendering the tree

if it returns return newTree then it fails.