Class: c3.Layout.Tree
Defined in: | js/c3.coffee |
Overview
A tree layout to parition elements hierarchically.
Instance Method Summary
- # (Object) construct(data) Bound Construct the tree hierarchy.
- # (?) revalue() Bound Compute the "total value" of each node
-
#
(Array)
layout(sort = false, limit_min_percent = 0, root_datum = null)
Bound
Layout the nodes x and y values
true
- Sort based on the total value of the child node.
Constructor Details
#
(void)
constructor(options)
@param options must contain:
key
- accessor to get a key from a data element
Either parent_key,
children_keys, or
childrento define the tree Either
valueor
self_value` for partitioning the nodes.
Instance Method Details
#
(Object)
construct(data)
Bound
Construct the tree hierarchy. A node is an object with the following properties: datum, children, x1, x2, y1, y2, px1, px2, py1, py2
#
(?)
revalue()
Bound
Compute the "total value" of each node
#
(Array)
layout(sort = false, limit_min_percent = 0, root_datum = null)
Bound
Layout the nodes x and y values
true
- Sort based on the total value of the child node.false
- Don't sort- Callback function - Function that takes a data element and returns the value to sort by. @param root_datum Only layout elements that are parents or children of this element.