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

Focus zoom on Root #22

Open
rfzsal opened this issue Nov 12, 2024 · 0 comments
Open

Focus zoom on Root #22

rfzsal opened this issue Nov 12, 2024 · 0 comments

Comments

@rfzsal
Copy link

rfzsal commented Nov 12, 2024

Is there a way to focus the zoom on the root instead of zoom to fit?

I want something like this by default.
image

here is my current code

const renderChart = (data) => {
        const options = {
            width: "100%",
            height: 700,
            nodeWidth: 120,
            nodeHeight: 80,
            childrenSpacing: 100,
            siblingSpacing: 30,
            direction: "left",
            enableToolbar: true,
        };

        const tree = new ApexTree(document.getElementById("svg-tree"), options);
        tree.render(data);
};

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant