@visx/hierarchy
TypeScript icon, indicating that this package has built-in type declarations

3.3.0 • Public • Published

@visx/hierarchy

Many datasets are intrinsically hierarchical. This package contains several react components for visualizing hierarchical data and largely mirrors d3-hierarchy.

Many components take the same input hierarchy data root node as defined in as specified in the d3-hierarchy module. For convenience, this package also exports the d3-hierarchyutility to generate this format.

// equivalent to `import { hierarchy } from 'd3-hierarchy';`
import { hierarchy } from '@visx/hierarchy';

const root = hierarchy({
  name: 'root',
  children: [
    { name: 'child #1' },
    {
      name: 'child #2',
      children: [{ name: 'grandchild #1' }, { name: 'grandchild #2' }, { name: 'grandchild #3' }],
    },
  ],
});

Installation

npm install --save @visx/hierarchy

Package Sidebar

Install

npm i @visx/hierarchy

Weekly Downloads

97,491

Version

3.3.0

License

MIT

Unpacked Size

55.4 kB

Total Files

47

Last publish

Collaborators

  • vx-hshoff
  • hshoff
  • christopher.card.williams
  • lencioni