public class Tree extends HierarchicalLayout
HierarchicalLayout.Node
Modifier | Constructor and Description |
---|---|
protected |
Tree() |
Modifier and Type | Method and Description |
---|---|
Tree |
children(DatumFunction<Array<HierarchicalLayout.Node>> df)
Sets the specified children accessor function.
|
Array<Double> |
nodeSize()
Returns the current node size, which defaults to null, meaning that the
layout has an overall fixed size, which
can be retrieved using
size() . |
Tree |
nodeSize(double width,
double height)
Sets a fixed size for each node as a two-element array of numbers
representing x and y.
|
Tree |
separation(Sort sort)
Uses the specified function to compute separation between neighboring
nodes.
|
Array<Double> |
size()
Returns the current tree size, which defaults to 1×1.
|
Tree |
size(double width,
double height)
Sets the available layout size to the specified two-element array of
numbers representing x and y.
|
Tree |
sort(Sort sort)
Sets the sort order of sibling nodes for the layout using the specified
comparator function.
|
DatumFunction<?> |
value()
Returns the current value accessor which defaults to null, meaning that
the value attribute is not computed.
|
Tree |
value(DatumFunction<?> df)
Sets the value accessor to the specified function.
|
links, nodes
public final Tree size(double width, double height)
a
- two-element array of width and height of treepublic final Array<Double> size()
public final Tree nodeSize(double width, double height)
width
- height
- public final Array<Double> nodeSize()
size()
.public final Tree sort(Sort sort)
D3#ascending()
or D3#descending()
.{@link
- Sort} a predefined sorting conventionpublic final Tree separation(Sort sort)
df
- a datum function describing how to calculate separation of
nodespublic final Tree children(DatumFunction<Array<HierarchicalLayout.Node>> df)
df
- a datum function describing how to compute childrenpublic final Tree value(DatumFunction<?> df)
df
- a datum function describing how to access node valuespublic final DatumFunction<?> value()
Copyright © 2015 gwt-d3. All rights reserved.