Skip to main content

Crate d3_hierarchy

Crate d3_hierarchy 

Source
Expand description

A port of d3-hierarchy 3.1.2 to Rust.

f64 throughout, and the same operation order as the JS, so results match to the bit. See README.md for the node representation.

Re-exports§

pub use node::hierarchy;
pub use node::hierarchy_with;
pub use node::object_children;
pub use node::Datum;
pub use node::Node;
pub use node::Tree;

Modules§

cluster
d3.cluster(), ported from d3-hierarchy 3.1.2 src/cluster.js.
node
hierarchy() and the Node methods, ported from d3-hierarchy 3.1.2 src/hierarchy/*.js.
pack
pack, ported from d3-hierarchy 3.1.2 src/pack/{enclose,siblings,index}.js.
partition
d3.partition(), ported from d3-hierarchy 3.1.2 src/partition.js.
stratify
stratify(), ported from d3-hierarchy 3.1.2 src/stratify.js.
tree
d3.tree(), ported from d3-hierarchy 3.1.2 src/tree.js — the Reingold-Tilford “tidy” layout via Buchheim et al.
treemap
The whole treemap family, ported from d3-hierarchy 3.1.2 src/treemap/{index,dice,slice,sliceDice,binary,squarify,resquarify,round}.js.

Functions§

lcg
src/constant.js / src/array.js: d3’s lcg().
shuffle
src/array.js’s shuffle(array, random).