mirror of
https://github.com/d3/d3.git
synced 2026-02-01 16:41:44 +00:00
Add d3-hierarchy.
This commit is contained in:
parent
fcc84c7abc
commit
1e7a0cf34e
63
README.md
63
README.md
@ -7,7 +7,7 @@ This branch contains the prerelease of D3 4.0. This API is unstable and may chan
|
||||
If you use NPM, `npm install d3@next`. Otherwise, download the [latest release](https://github.com/mbostock/d3/releases/latest). The released bundle supports AMD, CommonJS, and vanilla environments. Create a custom build using [Rollup](https://github.com/rollup/rollup) or your preferred bundler. You can also load directly from [d3js.org](https://d3js.org):
|
||||
|
||||
```html
|
||||
<script src="https://d3js.org/d3.v4.0.0-alpha.28.min.js"></script>
|
||||
<script src="https://d3js.org/d3.v4.0.0-alpha.29.min.js"></script>
|
||||
```
|
||||
|
||||
## API Reference
|
||||
@ -19,6 +19,7 @@ If you use NPM, `npm install d3@next`. Otherwise, download the [latest release](
|
||||
* [Delimiter-Separated Values](#delimiter-separated-values)
|
||||
* [Dispatches](#dispatches)
|
||||
* [Easings](#easings)
|
||||
* [Hierarchies](#hierarchies)
|
||||
* [Interpolators](#interpolators)
|
||||
* [Number Formats](#number-formats)
|
||||
* [Paths](#paths)
|
||||
@ -262,6 +263,66 @@ Easing functions for smooth animation.
|
||||
* [d3.easeBounceOut](https://github.com/d3/d3-ease#easeBounceOut) - reverse bounce easing.
|
||||
* [d3.easeBounceInOut](https://github.com/d3/d3-ease#easeBounceInOut) - symmetric bounce easing.
|
||||
|
||||
## [Hierarchies](https://github.com/d3/d3-hierarchy)
|
||||
|
||||
Layout algorithms for visualizing hierarchical data.
|
||||
|
||||
* [d3.hierarchy](#hierarchy) - constructs a root node from hierarchical data.
|
||||
* [*node*.ancestors](#node_ancestors) - generate an array of ancestors.
|
||||
* [*node*.descendants](#node_descendants) - generate an array of descendants.
|
||||
* [*node*.leaves](#node_leaves) - generate an array of leaves.
|
||||
* [*node*.path](#node_path) - generate the shortest path to another node.
|
||||
* [*node*.sum](#node_sum) - evaluate and aggregate quantitative values.
|
||||
* [*node*.sort](#node_sort) - sort all descendant siblings.
|
||||
* [*node*.each](#node_each) - breadth-first traversal.
|
||||
* [*node*.eachAfter](#node_eachAfter) - post-order traversal.
|
||||
* [*node*.eachBefore](#node_eachBefore) - pre-order traversal.
|
||||
* [*node*.copy](#node_copy) - copy a hierarchy.
|
||||
* [d3.stratify](#stratify) - create a new stratify operator.
|
||||
* [*stratify*](#_stratify) - construct a root node from tabular data.
|
||||
* [*stratify*.id](#stratify_id) - set the node id accessor.
|
||||
* [*stratify*.parentId](#stratify_parentId) - set the parent node id accessor.
|
||||
* [d3.cluster](#cluster) - create a new cluster (dendrogram) layout.
|
||||
* [*cluster*](#_cluster) - layout the specified hierarchy in a dendrogram.
|
||||
* [*cluster*.size](#cluster_size) - set the layout size.
|
||||
* [*cluster*.nodeSize](#cluster_nodeSize) - set the node size.
|
||||
* [*cluster*.separation](#cluster_separation) - set the separation between leaves.
|
||||
* [d3.tree](#tree) - create a new tidy tree layout.
|
||||
* [*tree*](#_tree) - layout the specified hierarchy in a tidy tree.
|
||||
* [*tree*.size](#tree_size) - set the layout size.
|
||||
* [*tree*.nodeSize](#tree_nodeSize) - set the node size.
|
||||
* [*tree*.separation](#tree_separation) - set the separation between nodes.
|
||||
* [d3.treemap](#treemap) - create a new treemap layout.
|
||||
* [*treemap*](#_treemap) - layout the specified hierarchy as a treemap.
|
||||
* [*treemap*.tile](#treemap_tile) - set the tiling method.
|
||||
* [*treemap*.size](#treemap_size) - set the layout size.
|
||||
* [*treemap*.round](#treemap_round) - set whether the output coordinates are rounded.
|
||||
* [*treemap*.padding](#treemap_padding) - set the padding.
|
||||
* [*treemap*.paddingInner](#treemap_paddingInner) - set the padding between siblings.
|
||||
* [*treemap*.paddingOuter](#treemap_paddingOuter) - set the padding between parent and children.
|
||||
* [*treemap*.paddingTop](#treemap_paddingTop) - set the padding between the parent’s top edge and children.
|
||||
* [*treemap*.paddingRight](#treemap_paddingRight) - set the padding between the parent’s right edge and children.
|
||||
* [*treemap*.paddingBottom](#treemap_paddingBottom) - set the padding between the parent’s bottom edge and children.
|
||||
* [*treemap*.paddingLeft](#treemap_paddingLeft) - set the padding between the parent’s left edge and children.
|
||||
* [d3.treemapBinary](#treemapBinary) - tile using a balanced binary tree.
|
||||
* [d3.treemapDice](#treemapDice) - tile into a horizontal row.
|
||||
* [d3.treemapSlice](#treemapSlice) - tile into a vertical column.
|
||||
* [d3.treemapSliceDice](#treemapSliceDice) - alternate between slicing and dicing.
|
||||
* [d3.treemapSquarify](#treemapSquarify) - tile using squarified rows per Bruls *et. al.*
|
||||
* [*squarify*.ratio](#squarify_ratio) - set the desired rectangle aspect ratio.
|
||||
* [d3.partition](#partition) - create a new partition (icicle or sunburst) layout.
|
||||
* [*partition*](#_partition) - layout the specified hierarchy as a partition diagram.
|
||||
* [*partition*.size](#partition_size) - set the layout size.
|
||||
* [*partition*.round](#partition_round) - set whether the output coordinates are rounded.
|
||||
* [*partition*.padding](#partition_padding) - set the padding.
|
||||
* [d3.pack](#pack) - create a new circle-packing layout.
|
||||
* [*pack*](#_pack) - layout the specified hierarchy using circle-packing.
|
||||
* [*pack*.radius](#pack_radius) - set the radius accessor.
|
||||
* [*pack*.size](#pack_size) - set the layout size.
|
||||
* [*pack*.padding](#pack_padding) - set the padding.
|
||||
* [d3.packSiblings](#packSiblings) - pack the specified array of circles.
|
||||
* [d3.packEnclose](#packEnclose) - enclose the specified array of circles.
|
||||
|
||||
## [Interpolators](https://github.com/d3/d3-interpolate)
|
||||
|
||||
Interpolate numbers, colors, strings, arrays, objects, whatever!
|
||||
|
||||
17
index.js
17
index.js
@ -402,6 +402,23 @@ export {
|
||||
axisLeft
|
||||
} from "d3-axis";
|
||||
|
||||
export {
|
||||
cluster,
|
||||
hierarchy,
|
||||
pack,
|
||||
packSiblings,
|
||||
packEnclose,
|
||||
partition,
|
||||
stratify,
|
||||
tree,
|
||||
treemap,
|
||||
treemapBinary,
|
||||
treemapDice,
|
||||
treemapSlice,
|
||||
treemapSliceDice,
|
||||
treemapSquarify
|
||||
} from "d3-hierarchy";
|
||||
|
||||
export {
|
||||
voronoi
|
||||
} from "d3-voronoi";
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "d3",
|
||||
"version": "4.0.0-alpha.28",
|
||||
"version": "4.0.0-alpha.29",
|
||||
"publishConfig": {
|
||||
"tag": "next"
|
||||
},
|
||||
@ -47,6 +47,7 @@
|
||||
"d3-dsv": "0.3.1",
|
||||
"d3-ease": "0.7.0",
|
||||
"d3-format": "0.5.1",
|
||||
"d3-hierarchy": "0.2.0",
|
||||
"d3-interpolate": "0.7.0",
|
||||
"d3-path": "0.1.5",
|
||||
"d3-polygon": "0.2.1",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user