Skip to content
💫 Display dynamic, automatically organised, customizable network views.
JavaScript HTML TypeScript CSS
Branch: master
Clone or download

Latest commit

renovate and renovate-bot fix(deps): update dependency vis-dev-utils to v2.2.6 (#625)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Latest commit 755d90a Apr 16, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci chore(deps): update node.js to v12.16 (#441) Feb 17, 2020
.github chore(github): update issue template (#148) Oct 2, 2019
.vscode use rollup instead of gulp/webpack (#1) Jul 12, 2019
__snapshots__/test fix(rng)!: use better seedable RNG (#352) Jan 18, 2020
common-docs-files docs(i18n): add en/kr navigation (#253) Dec 14, 2019
cypress feat(build): use common build process (#526) Mar 11, 2020
docs-kr feat: add node opacity (#554) Mar 31, 2020
docs feat: getPositions signature fix, getPosition feature. (#637) Apr 16, 2020
examples/network docs(builds): update outdated info and add missing ESNext (#611) Apr 7, 2020
lib feat: getPositions signature fix, getPosition feature. (#637) Apr 16, 2020
misc chore(docs): update opencollective Jul 16, 2019
scripts/examples-index fix(package): update and remove leftovers (#240) Nov 18, 2019
test feat: getPositions signature fix, getPosition feature. (#637) Apr 16, 2020
types feat: getPositions signature fix, getPosition feature. (#637) Apr 16, 2020
.csslintrc csslint deactivated 'adjoining-classes' Dec 6, 2016
.eslintignore Use TypeScript index file (#20) Jul 28, 2019
.eslintrc.js test(e2e): add Cypress (#187) Oct 29, 2019
.gitignore feat(build): use common build process (#526) Mar 11, 2020
.mdlrc mdlint: allow dollar signs used before commands without showing output Dec 6, 2016
.mocharc.json feat(build): use common build process (#526) Mar 11, 2020
.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 style(prettier): enforce default style in new TS files (#88) Aug 27, 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 v5.1.0 (#36) Jul 28, 2019
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 docs(readme): fix example chart image link Jan 19, 2020
babel.config.js feat(build): use common build process (#526) Mar 11, 2020
cypress.json chore(e2e): preprocess TS externally (#284) Dec 14, 2019
generate-examples-index.json chore(examples): update conf for new Vis Dev Utils (#350) Jan 12, 2020
index.html docs(i18n): add en/kr navigation (#253) Dec 14, 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 fix(deps): update dependency vis-dev-utils to v2.2.6 (#625) Apr 16, 2020
package.json fix(deps): update dependency vis-dev-utils to v2.2.6 (#625) Apr 16, 2020
renovate.json chore(deps): add renovate.json (#412) Feb 16, 2020
rollup.build.js feat(build): use common build process (#526) Mar 11, 2020
rollup.config.js fix(uuid): replace vis-uuid by uuid (#462) Feb 22, 2020
tsconfig.code.json chore(e2e): preprocess TS externally (#284) Dec 14, 2019
tsconfig.declarations.json chore(e2e): preprocess TS externally (#284) Dec 14, 2019
tsconfig.json chore(e2e): preprocess TS externally (#284) Dec 14, 2019
tsconfig.types.json chore(e2e): preprocess TS externally (#284) Dec 14, 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 Greenkeeper badge npm

GitHub contributors Backers on Open Collective Sponsors on Open Collective

Install

Install via npm:

$ npm install vis-network

Example

A basic example on loading a Network 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/standalone/umd/vis-network.min.js"></script>
  <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.