-
Notifications
You must be signed in to change notification settings - Fork 78
Core
# d3.layout.phylotree([container])
Create a phylogenetic tree viewer with default settings (which can be modified before rendering). If container is specified (as a CSS selector), sets the DOM element whose events will be tracked by the tree viewer to; by default this is set to body
. If multiple tree viewers are shown on the same page, this needs to be set to different values for different objects (e.g. to enclosing <div>
elements).
Returns a phylotree
function (object) which is then instantiated with tree data (e.g. through Newick string).
var tree_object = d3.layout.phylotree ("#my_container");
... apply settings ...
tree_object = tree_object (newick_string);
# phylotree(data, [bootstrap])
Instantiate a tree object: build the tree structure and lay it out to screen coordinates (but do not render yet), using current settings.
If data is a string, calls an internal Newick string parser d3_phylotree_newick_parser to convert the string to an hierarchical collection of nodes consumed by d3.layout.hierarchy, with default accessor functions. If data is not a string, it is expected to be an object having the same format as that produced by d3_phylotree_newick_parser.
When set, bootstrap controls how internal node names are interpreted: as names (if false), or bootstrap support values (numeric, if true).
Returns the instantiated phylotree
object.