Socket
Socket
Sign inDemoInstall

@types/d3-hierarchy

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/d3-hierarchy

TypeScript definitions for d3-hierarchy


Version published
Weekly downloads
1.9M
decreased by-3.71%
Maintainers
1
Weekly downloads
 
Created

What is @types/d3-hierarchy?

@types/d3-hierarchy provides TypeScript type definitions for the d3-hierarchy module, which is part of the D3.js library. This module is used for creating and manipulating hierarchical data structures such as trees, clusters, partitions, and treemaps.

What are @types/d3-hierarchy's main functionalities?

Tree Layout

The tree layout organizes data into a tree structure. The `d3.hierarchy` function is used to create a root node from the data, and `d3.tree` generates the tree layout.

const root = d3.hierarchy(data);
const treeLayout = d3.tree();
treeLayout(root);

Cluster Layout

The cluster layout arranges nodes in a dendrogram. Similar to the tree layout, `d3.hierarchy` creates the root node, and `d3.cluster` generates the cluster layout.

const root = d3.hierarchy(data);
const clusterLayout = d3.cluster();
clusterLayout(root);

Treemap Layout

The treemap layout displays hierarchical data as a set of nested rectangles. The `d3.hierarchy` function creates the root node, and `d3.treemap` generates the treemap layout.

const root = d3.hierarchy(data).sum(d => d.value);
const treemapLayout = d3.treemap();
treemapLayout(root);

Partition Layout

The partition layout is used to create a space-filling visualization of hierarchical data. The `d3.hierarchy` function creates the root node, and `d3.partition` generates the partition layout.

const root = d3.hierarchy(data).sum(d => d.value);
const partitionLayout = d3.partition();
partitionLayout(root);

Pack Layout

The pack layout arranges nodes in a circle-packing layout. The `d3.hierarchy` function creates the root node, and `d3.pack` generates the pack layout.

const root = d3.hierarchy(data).sum(d => d.value);
const packLayout = d3.pack();
packLayout(root);

Other packages similar to @types/d3-hierarchy

FAQs

Package last updated on 18 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc