Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making a vertical family tree #7

Open
Ayesha-Sayyed opened this issue Apr 18, 2022 · 2 comments
Open

Making a vertical family tree #7

Ayesha-Sayyed opened this issue Apr 18, 2022 · 2 comments
Assignees
Labels
awaiting answer enhancement New feature or request

Comments

@Ayesha-Sayyed
Copy link

how can i change tree from a horizontal view to a vertical one ?

@BenPortner
Copy link
Owner

Hi @Ayesha-Sayyed,

Thanks for using js_family_tree. I just pushed version 0.2.0, which implements a new orientation setter/getter. To get a vertical family tree, you can use it as follows:

        // insert svg object to hold the family tree
        const svg = d3.select("body").append("svg")
            .attr("width", document.body.offsetWidth)
            .attr("height", document.documentElement.clientHeight);

        // make family tree object
        FT = new FamilyTree(data, svg).orientation("vertical");

        // draw family tree
        FT.draw();

Let me know if it works for you! :)

Cheers.
Ben

@BenPortner BenPortner self-assigned this Jul 14, 2022
@BenPortner BenPortner added enhancement New feature or request awaiting answer labels Jul 14, 2022
@dthemg
Copy link
Contributor

dthemg commented Aug 5, 2022

I found a bug in the vertical links, opened a PR for it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting answer enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants