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

Support Mermaid style source of family tree #59

Closed damascene closed 6 months ago

damascene commented 1 year ago

Mermaid is a tool to generate diagrams from markdown-like text. They have been used to create family trees by many users but it lack support for some important features. Could you please implement a method to import family tree from mermaid format.

Example:

graph TD
    Parent1 --> p1p2( )
    Parent2 --> p1p2

    Parent3 --> p3p4( )
    Parent4 --> p3p4

    p1p2 --> Child1

    Someone1 --> c2x1
    Child2 --> c2x1( )

    p1p2 --> Child2
    p1p2 --> Child3
    Child4 --> c4c5( )
    Child5 --> c4c5
    p1p2 --> Child4

    p3p4 --> Child5
    p3p4 --> Child6
    p3p4 --> Child7
    p3p4 --> Child8

    c2x1 --> SubChild1

    c4c5 --> SubChild2

looks like:

graph TD
    Parent1 --> p1p2( )
    Parent2 --> p1p2

    Parent3 --> p3p4( )
    Parent4 --> p3p4

    p1p2 --> Child1

    Someone1 --> c2x1
    Child2 --> c2x1( )

    p1p2 --> Child2
    p1p2 --> Child3
    Child4 --> c4c5( )
    Child5 --> c4c5
    p1p2 --> Child4

    p3p4 --> Child5
    p3p4 --> Child6
    p3p4 --> Child7
    p3p4 --> Child8

    c2x1 --> SubChild1

    c4c5 --> SubChild2

However it lacks many features like horizontal linking in image support, maybe your project can import Mermaid format and convert it to proper family tree or possible commit some improvement to their style.

https://github.com/mermaid-js/mermaid/

ZornitsaPesheva commented 1 year ago

With our tool it is not possible to see the parents of both partners at once you know?