BALKANGraph / OrgChartJS

OrgChart JS is a simple, flexible and highly customizable organization chart plugin for presenting the structure of your organization and the relationships in an elegant way.
https://balkan.app/orgchartjs
252 stars 84 forks source link

use of OrgChart and FamilyTree at the same time #721

Closed aleresoftware closed 1 year ago

aleresoftware commented 1 year ago

Hi there, I am wondering use of OrgChart Js and FamilyTree Js at the same in same project if that is possible. Because I see syntax of those two are totally different from each other if I am not wrong. I have even tried making changes on those syntax but still did not work. I am working on project where I have to use both to make it compatible with my use cases.

Thank you.

For FamilyTree Js

and

For OrgChart Js

<script>
    var chart = new OrgChart(document.getElementById("tree"), {
        nodeBinding: {
            field_0: "name"
        },
        nodes: [
            { id: 1, name: "Amber McKenzie" },
            { id: 2, pid: 1, name: "Ava Field" },
            { id: 3, pid: 1, name: "Peter Stevens" }  
        ]
    });
</script> 
aleresoftware commented 1 year ago

I was able to fix it myself