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

vis

Package Overview
Dependencies
Maintainers
5
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vis

A dynamic, browser-based visualization library.

  • 4.21.0-EOL
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
279K
increased by12.72%
Maintainers
5
Weekly downloads
 
Created

What is vis?

The vis npm package is a dynamic, browser-based visualization library. It is designed to handle large amounts of dynamic data and enables the creation of interactive timelines, 2D/3D graphs, and network visualizations.

What are vis's main functionalities?

Timeline

The Timeline feature allows you to create interactive timelines with items that can have start and end dates. This is useful for visualizing events over time.

const vis = require('vis');

// Create a DataSet (allows two way data-binding)
var items = new vis.DataSet([
  {id: 1, content: 'item 1', start: '2023-04-20'},
  {id: 2, content: 'item 2', start: '2023-04-14'},
  {id: 3, content: 'item 3', start: '2023-04-18'},
  {id: 4, content: 'item 4', start: '2023-04-16', end: '2023-04-19'},
  {id: 5, content: 'item 5', start: '2023-04-25'},
  {id: 6, content: 'item 6', start: '2023-04-27', type: 'point'}
]);

// Configuration for the Timeline
var options = {};

// Create a Timeline
var timeline = new vis.Timeline(container, items, options);

Network

The Network feature allows you to create interactive network graphs with nodes and edges. This is useful for visualizing relationships and connections between entities.

const vis = require('vis');

// create an array with nodes
var nodes = new vis.DataSet([
  {id: 1, label: 'Node 1'},
  {id: 2, label: 'Node 2'},
  {id: 3, label: 'Node 3'},
  {id: 4, label: 'Node 4'},
  {id: 5, label: 'Node 5'}
]);

// create an array with edges
var edges = new vis.DataSet([
  {from: 1, to: 3},
  {from: 1, to: 2},
  {from: 2, to: 4},
  {from: 2, to: 5}
]);

// create a network
var container = document.getElementById('mynetwork');
var data = {
  nodes: nodes,
  edges: edges
};
var options = {};
var network = new vis.Network(container, data, options);

Graph2D

The Graph2D feature allows you to create interactive 2D graphs. This is useful for visualizing data points over a two-dimensional space.

const vis = require('vis');

// Create a DataSet (allows two way data-binding)
var data = new vis.DataSet();

// Add data
for (var i = 0; i < 100; i++) {
  data.add({x: i, y: Math.sin(i / 5)});
}

// Configuration for the Graph2d
var options = {
  start: '2023-04-10',
  end: '2023-04-30'
};

// Create a Graph2d
var container = document.getElementById('mygraph');
var graph2d = new vis.Graph2d(container, data, options);

Other packages similar to vis

Keywords

FAQs

Package last updated on 28 Jul 2019

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