Socket
Socket
Sign inDemoInstall

vega-hierarchy

Package Overview
Dependencies
Maintainers
4
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.


Version published
Weekly downloads
138K
increased by3.08%
Maintainers
4
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 14 Jun 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