BALKANGraph / FamilyTreeJS

Build family tree app with BALKAN FamilyTreeJS library. Family Tree also called a genealogy or a pedigree chart, is a chart representing family relationships in a conventional tree structure.
50 stars 16 forks source link

Unexpected rendering : Everything is gray #80

Closed sylvain-guillet closed 8 months ago

sylvain-guillet commented 8 months ago

I've created an minimal example but the UI is gray : image

My code :

<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>title</title>
    <script src="familytree.js"></script>
  </head>
  <body>
    <div style="width:100%; height:700px;" id="tree"></div>
    <script>
        let family = new FamilyTree(document.getElementById("tree"), {
            nodeBinding: {
                field_0: "name"
            },
            nodes: [
                { id: 1, pids: [2], name: "Amber McKenzie" },
                { id: 2, pids: [1], name: "Ava Field" },
                { id: 3, mid: 1, fid: 2, name: "Peter Stevens" }  
            ]
        });
    </script> 
  </body>
</html>
ZornitsaPesheva commented 8 months ago

You need to add "gender" property to the nodes.

sylvain-guillet commented 8 months ago

You need to add "gender" property to the nodes.

Thank you, it works and obviously it's logic but you should update your example in the 'getting started' section : image

ZornitsaPesheva commented 8 months ago

Done! Thank you!