ErikGartner / dTree

A library for visualizing data trees with multiple parents, such as family trees. Built on top of D3.
https://treehouse.gartner.io/ErikGartner/58e58be650453b6d49d7
MIT License
521 stars 139 forks source link

Composite family #56

Closed lhf1990729 closed 7 years ago

lhf1990729 commented 7 years ago

treeData = [{ "name": "Niclas Superlongsurname", "class": "man", "textClass": "emphasis", "marriages": [{ "spouse": { "name": "Iliana", "class": "woman" }, "children": [{ "name": "James", "class": "man", "children": [{ "name": "james 1", "class": "man",

      }],
  "marriages": [{
    "spouse": {
      "name": "Alexandra",
      "class": "woman",
       "children": [{
      "name": "james 1",
      "class": "man",

      }]
    },
    "children": [{
      "name": "Eric",
      "class": "man",
      "marriages": [{
        "spouse": {
          "name": "Eva",
          "class": "woman"
        }
      }]
    }, {
      "name": "Jane",
      "class": "woman"
    }, {
      "name": "Jasper",
      "class": "man"
    }, {
      "name": "Emma",
      "class": "woman"
    }, {
      "name": "Julia",
      "class": "woman"
    }, {
      "name": "Jessica",
      "class": "woman"
    }]
  }]
}]

}] }]

dTree.init(treeData, { target: "#graph", debug: true, height: 800, width: 1200, callbacks: { nodeClick: function(name, extra) { console.log(name); } } });

ErikGartner commented 7 years ago

Please specify what the issue. Preferable with a link to a jfiddle demo.

lhf1990729 commented 7 years ago

just like this issues! https://github.com/ErikGartner/dTree/issues/51

ErikGartner commented 7 years ago

Oh, I see. I'll close this duplicate then. Please use 51 for discussion.