Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vega-hierarchy

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-hierarchy

Hierarchical layout transforms for Vega dataflows.

  • 3.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
146K
decreased by-1.67%
Maintainers
1
Weekly downloads
 
Created

What is vega-hierarchy?

The vega-hierarchy npm package provides utilities for creating and manipulating hierarchical visualizations such as tree diagrams, treemaps, and partition layouts. It is part of the Vega ecosystem, which is a visualization grammar that allows for the creation of a wide range of visualizations.

What are vega-hierarchy's main functionalities?

Tree Layout

This feature allows you to create tree layouts from hierarchical data. The code sample demonstrates how to create a tree layout using the vega-hierarchy package.

const vega = require('vega');
const vegaHierarchy = require('vega-hierarchy');

const data = {
  name: 'root',
  children: [
    { name: 'child1' },
    { name: 'child2', children: [{ name: 'grandchild1' }] }
  ]
};

const treeLayout = vegaHierarchy.tree();
const treeData = treeLayout(data);
console.log(treeData);

Treemap Layout

This feature allows you to create treemap layouts from hierarchical data. The code sample demonstrates how to create a treemap layout using the vega-hierarchy package.

const vega = require('vega');
const vegaHierarchy = require('vega-hierarchy');

const data = {
  name: 'root',
  children: [
    { name: 'child1', value: 100 },
    { name: 'child2', value: 200 }
  ]
};

const treemapLayout = vegaHierarchy.treemap();
const treemapData = treemapLayout(data);
console.log(treemapData);

Partition Layout

This feature allows you to create partition layouts from hierarchical data. The code sample demonstrates how to create a partition layout using the vega-hierarchy package.

const vega = require('vega');
const vegaHierarchy = require('vega-hierarchy');

const data = {
  name: 'root',
  children: [
    { name: 'child1', value: 100 },
    { name: 'child2', value: 200 }
  ]
};

const partitionLayout = vegaHierarchy.partition();
const partitionData = partitionLayout(data);
console.log(partitionData);

Other packages similar to vega-hierarchy

Keywords

FAQs

Package last updated on 04 May 2018

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