This is a test version of Biostars. For the public version, visit https://www.biostars.org.
phylotree.js d3 SVG size not what I wanted upon page load

Hi All,

I am adopting phylotree.js for the display of similar compounds. Currently I am having an issue to display the tree in proper SVG size upon initial page load. Please see the link below:

http://lubw.com/phylotree/index.php

I am setting the width of the SVG to be 800 px and the height 600 px. However, upon page load, the width is 304 px and height is 517 px.

Anyone has a clue of why the SVG dimension changed? How can I force it to display in 800 x 600?

Strangely, if I click on any of the buttons above the tree, the SVG dimension will become approximately 800 x 600.

Thanks a lot.

phylotree.js d3.js svg

1 answer

Solved the problem by asking the question to the Phylotree.js developers. See the answer below. Please scroll to the end of the conversation thread to see the answer.

https://github.com/veg/phylotree.js/issues/123

Log in to answer this question.