Skip to content
💫 Display dynamic, automatically organised, customizable network views.
JavaScript HTML TypeScript CSS
Branch: master
Clone or download
renovate and renovate-bot chore(deps): update dependency jsdom to v16.1.0 (#427)
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
Latest commit 74a1a26 Feb 16, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci ci(gh-pages): include Korean docs (#322) Dec 23, 2019
.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 test(e2e): add click and drag tests (#289) Dec 23, 2019
dev-lib chore(build): use common header and Babel preset (#330) Dec 30, 2019
docs-kr feat(edges): optionally don't render self reference edge behind the n… Jan 28, 2020
docs feat(edges): optionally don't render self reference edge behind the n… Jan 28, 2020
examples/network fix(edges): correctly detect self ref edge hover (#399) Jan 28, 2020
lib fix(locale): correct French spelling (#416) Feb 6, 2020
misc chore(docs): update opencollective Jul 16, 2019
scripts/examples-index fix(package): update and remove leftovers (#240) Nov 18, 2019
test fix(arrows): position self ref arrows to two different spots (#402) Jan 31, 2020
types fix(types): add missing imagePadding to NodeOptions (#413) Feb 2, 2020
.babelrc chore(build): use common header and Babel preset (#330) Dec 30, 2019
.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 chore(examples): update conf for new Vis Dev Utils (#350) Jan 12, 2020
.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 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.mocha.js add and improve test coverage (#8) Jul 25, 2019
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 chore(deps): update dependency jsdom to v16.1.0 (#427) Feb 16, 2020
package.json chore(deps): update dependency jsdom to v16.1.0 (#427) Feb 16, 2020
renovate.json chore(deps): add renovate.json (#412) Feb 16, 2020
rollup.build.js chore(build): use common header and Babel preset (#330) Dec 30, 2019
rollup.config.js chore(build): use common header and Babel preset (#330) Dec 30, 2019
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.