Skip to content

Zycon42/d3-flextree-v4

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

d3-flextree-v4

This is a copy of the d3-flextree D3 plugin updated to be compatible with version 4 of D3.

Usage

This library operates on d3-hierarchy objects. Its API is similar to d3.tree, the main difference being that nodeSize() also accepts a function that will be called for each node.

const flextree = require('d3-flextree-v4');
const tree = flextree().nodeSize((node) => {
  return [
    node.data.width,
    node.data.height
  ];
});

flextree(hierarchy); // adds "x" and "y" properties for each node.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published