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

How to show all of the graph without collapsing anything ? #67

Open aesislabs opened 1 year ago

aesislabs commented 1 year ago

Hi,

This library is almost perfect, I just want to be able to show the full tree witjout collapsing anything, is it possible ?

Thanks a lot

ZornitsaPesheva commented 1 year ago

It is not possible to show all the nodes in the current version. We may implement it in the future somehow, but now it is not possible.

aesislabs commented 10 months ago

It would be a fantastic new feature, any way we can help add this to the codebase ?

In the meantime, how to manage exporting a full family tree when some nodes are colapsed ?

ZornitsaPesheva commented 10 months ago

As you cannot show all the nodes, you cannot export them too. You can try to export the chart with different roots and merge them using some other app,

aesislabs commented 10 months ago

Thanks you for your answers.

It seems that the functionality to hide parts of the tree has some bugs.

Here's a simple tree with a spouse, parents and sibklings. When showing the tree, it's collapsed even if there's not much to show:

image

When clicking on the expand button, everything shows perfectly and the button disappear:

image

aesislabs commented 10 months ago

It would be great to have a way to force the tree to show everything even if it's big, it would make this library the absolute best on the market right now (and trust me, I've tested lots of libs).

We will buy the paid version in the near future but I'm also willing to contribute to the project, I've made some updates by overriding some psarts of the code that could make it even better and I could contribute for free.

ZornitsaPesheva commented 10 months ago

In the above screenshot, you can set roots in the configurations, to show the whole tree. You need to set Jose or Mamie as roots: roots: [3]

var family = new FamilyTree(document.getElementById("tree"), {
    nodeBinding: {
        field_0: "id"
    },
    roots: [1],
...
});
aesislabs commented 10 months ago

It's not really a solution because I have no way of determining WHEN to set the root as you suggest. Sometimes when doing so it results to a unusable tree because the root makes the layout weird.

In this case if I set as you say it's working, but if I set "Marie Lambert" as the root the tree is wrong and there's no button to expand:

image

For this to work I need to be able to know when and how to set the root automatically

ZornitsaPesheva commented 10 months ago

Please edit this example to isolate the issue: https://code.balkan.app/family-tree-js/issue-67#JS

harshithva commented 1 day ago

how can I show the full tree without hiding the nodes

ZornitsaPesheva commented 1 day ago

how can I show the full tree without hiding the nodes

Currently this is not possible. We are working on another implementation where it will be possible, but I still don't know when it will be released. You can follow us on LinkedIn and Facebook for any news.