May 2019
Beginner to intermediate
650 pages
14h 50m
English
A pack layout function is created with d3.pack(). Calling the function with the root node of a hierarchical dataset will generate three properties for each node: x, y, and r, which represent the center and radius of each circle.
The configuration methods are listed in the following table:
|
Function |
Description |
|
radius(value) |
If not specified, the radius of each circle is derived from the leaf node's value property (computed by sum() or count()). This is the default behavior. If radius is specified (usually with an accessor function), the radius will be exactly the value provided. |
|
size(array) |
This function specifies the size of the chart. All the x, y, and r values will be computed within these bounds, unless ... |
Read now
Unlock full access