Closed jrso15 closed 1 month ago
Hi, there is a react integration sample.
Was not it useful?
I also wrote a general guide about the integration of d3 visualization (check out the integration section), it might be useful
Hi Bumbeishviili,
I followed some of your documentation.
And this is exactly what I’m getting:
And I can’t find any solution for this.
I want to implement something like this:
https://stackblitz.com/edit/d3-org-chart-react-integration-hooks-topjz5?file=index.js
Hi Bumbeishvili! I finally able to find the issue and it’s working now.
I have one more question, for JSON data what’s the sample structure for it, do you have one that I can follow? all I can see is csv data example. because it’s not showing the children per person.
Hope you can help me! Thank you in advance!🙏
sample data:
{ "name": "test name", "level": 1, "is_manager": "y", "title": "INGENIEUR SI", "manager": { "name": "test name", "level": 0, "is_manager": "y", "title": "REGIONAL DIRECTOR", "manager": null, "expanded": false, "image": "", "children": null }, "expanded": true, "image": "", "children": [ { "name": "test", "level": 2, "is_manager": "n", "title": "SERVICE PROVIDER FOR OTHER DOMAINS", "manager": null, "expanded": false, "image": "", "children": [] }, { "name": "first name", "level": 2, "is_manager": "n", "title": "INGENIEUR SI", "manager": null, "expanded": false, "image": "", "children": [] }, { "name": "first name", "level": 2, "is_manager": "n", "title": "INGENIEUR SI", "manager": null, "expanded": false, "image": "", "children": [] }, ] }
It does not have a specific structure.
The only thing necessary is to be able to tell hierarchy, for that default id
and parentId
or nodeId
and parentNodeId
is checked (which you can also override)
There is one JSON sample here - https://github.com/bumbeishvili/org-chart?tab=readme-ov-file#features
But again, it does not matter what structure you have as long as you have a hierarchy extractable. Also, you can't have multiple roots, so be aware of that
Thank you!❤️
Hello,
I’m currently trying to implement OrgChart in d3-org-chart but I’m getting OrgChart is not a constructor. I can’t find any solution for this. can someone please help me?
Here’s sample of my code:
Thanks in advance!