Skip to content
💫 Display dynamic, automatically organised, customizable network views.
JavaScript TypeScript CSS HTML
Branch: master
Clone or download
greenkeeper and Thomaash chore(package): update rollup-plugin-typescript2 to version 0.23.0 (#86)
* chore(package): update rollup-plugin-typescript2 to version 0.23.0

* chore(package): update lockfile package-lock.json
Latest commit cd880dd Aug 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci ci: overhaul (#55) Aug 4, 2019
.github Create FUNDING.yml Jul 18, 2019
.vscode use rollup instead of gulp/webpack (#1) Jul 12, 2019
dist fix: fix initial scaling (#70) Aug 13, 2019
docs Added new events for Control Node D&D (#23) Jul 27, 2019
examples chore(examples): use string labels in Hierarchical Layout without Phy… Aug 16, 2019
lib chore(build): use Rollup to bundle CSS (#69) Aug 13, 2019
misc chore(docs): update opencollective Jul 16, 2019
test docs: add missing doc comment (#64) Aug 10, 2019
types fix: create valid TS types (#45) Jul 30, 2019
.babelrc chore(build): use Rollup to bundle CSS (#69) Aug 13, 2019
.csslintrc csslint deactivated 'adjoining-classes' Dec 6, 2016
.eslintignore Use TypeScript index file (#20) Jul 28, 2019
.eslintrc.js Use TypeScript index file (#20) Jul 28, 2019
.gitignore Use TypeScript index file (#20) Jul 28, 2019
.mdlrc mdlint: allow dollar signs used before commands without showing output Dec 6, 2016
.mocharc.json add and improve test coverage (#8) Jul 25, 2019
.npmignore Removed the light version of vis.js, added documentation on custom bu… Jul 22, 2014
.nycrc.json add and improve test coverage (#8) Jul 25, 2019
.prettierrc.json add and improve test coverage (#8) Jul 25, 2019
.releaserc.yml chore(CI): add CircleCI config (#48) Aug 2, 2019
CODE-OF-CONDUCT.md chore: add code of conduct Jul 12, 2019
CONTRIBUTING.md chore(docs): update opencollective Jul 16, 2019
HISTORY.md
LICENSE-APACHE-2.0 Dual licensed vis.js (see #285) Oct 24, 2014
LICENSE-MIT chore(docs): general improvements (#2652) Jan 30, 2017
README.md chore: add Greenkeeper badge 🌴 (#63) Aug 10, 2019
babel.mocha.js add and improve test coverage (#8) Jul 25, 2019
index.html add and improve test coverage (#8) Jul 25, 2019
jsdoc.json Add template for document generation with 'jsdoc'. (#3497) Jun 9, 2019
launch.json use rollup instead of gulp/webpack (#1) Jul 12, 2019
package-lock.json chore(package): update rollup-plugin-typescript2 to version 0.23.0 (#86) Aug 23, 2019
package.json chore(package): update rollup-plugin-typescript2 to version 0.23.0 (#86) Aug 23, 2019
rollup.config.js fix(build): extend other Vis libraries (#71) Aug 13, 2019
tsconfig.code.json Use TypeScript index file (#20) Jul 28, 2019
tsconfig.json add and improve test coverage (#8) Jul 25, 2019
tsconfig.types.json Use TypeScript index file (#20) Jul 28, 2019

README.md

vis-network

example chart

Network is a visualization to display networks and networks consisting of nodes and edges. The visualization is easy to use and supports custom shapes, styles, colors, sizes, images, and more. The network visualization works smooth on any modern browser for up to a few thousand nodes and edges. To handle a larger amount of nodes, Network has clustering support. Network uses HTML canvas for rendering.

Badges

semantic-release npm Greenkeeper badge

GitHub contributors GitHub stars

Backers on Open Collective Sponsors on Open Collective

Install

Install via npm:

$ npm install vis-network

Example

A basic example on loading a Timeline is shown below. More examples can be found in the examples directory of the project.

<!doctype html>
<html>
<head>
  <title>Network</title>
  <script type="text/javascript" src="https://unpkg.com/vis-network@latest/dist/vis-network.min.js"></script>
  <link href="https://unpkg.com/vis-network@latest/dist/vis-network.min.css" rel="stylesheet" type="text/css" />
  <style type="text/css">
    #mynetwork {
      width: 600px;
      height: 400px;
      border: 1px solid lightgray;
    }
  </style>
</head>
<body>
<div id="mynetwork"></div>
<script type="text/javascript">
  // 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},
    {from: 3, to: 3}
  ]);

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

Build

To build the library from source, clone the project from github

$ git clone git://github.com/visjs/vis-network.git

The source code uses the module style of node (require and module.exports) to organize dependencies. To install all dependencies and build the library, run npm install in the root of the project.

$ cd vis-network
$ npm install

Then, the project can be build running:

$ npm run build

Test

To test the library, install the project dependencies once:

$ npm install

Then run the tests:

$ npm run test

Contribute

Contributions to the vis.js library are very welcome! We can't do this alone!

Backers

Thank you to all our backers! 🙏

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

License

Copyright (C) 2010-2018 Almende B.V. and Contributors

Vis.js is dual licensed under both

and

Vis.js may be distributed under either license.

You can’t perform that action at this time.