Skip to content
πŸ“ˆ Create a fully customizable, interactive timelines and 2d-graphs with items and ranges.
JavaScript CSS HTML
Branch: master
Clone or download
Thomaash and mojoaxel fix(build): extend other visjs libraries (#53)
* fix(build): extend other Vis libraries

They were overwritten before which resulted in only one Vis library
being usable at a time.

* chore(dist): update
Latest commit c26e244 Aug 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github chore(docs): update opencollective Jul 16, 2019
.vscode use rollup instead of gulp/webpack (#1) Jul 12, 2019
dist fix(build): extend other visjs libraries (#53) Aug 14, 2019
docs fix(examples): fix css imports Jul 21, 2019
examples Merge timeline plus (#5) Aug 11, 2019
lib Merge timeline plus (#5) Aug 11, 2019
test Merge timeline plus (#5) Aug 11, 2019
.babelrc fix(babel): add CSS support (#37) Aug 2, 2019
.csslintrc csslint deactivated 'adjoining-classes' Dec 6, 2016
.eslintrc.js use rollup instead of gulp/webpack (#1) Jul 12, 2019
.gitignore Unit tests: upgrade jsdom to v11 to fix breaking unit tests for Netwo… Jun 9, 2019
.mdlrc mdlint: allow dollar signs used before commands without showing output Dec 6, 2016
.npmignore Removed the light version of vis.js, added documentation on custom bu… Jul 22, 2014
CODE-OF-CONDUCT.md chore: add code of conduct Jul 12, 2019
CONTRIBUTING.md chore(docs): update opencollective Jul 16, 2019
HISTORY.md Merge timeline plus (#5) Aug 11, 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 make it possible to exclude external libraries (#9) Jul 22, 2019
index.html v5.0.0 Jul 19, 2019
index.js Merge timeline plus (#5) Aug 11, 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.json Merge timeline plus (#5) Aug 11, 2019
rollup.config.js fix(build): extend other visjs libraries (#53) Aug 14, 2019

README.md

vis-timeline

example chart

The Timeline/Graph2D is an interactive visualization chart to visualize data in time. The data items can take place on a single date, or have a start and end date (a range). You can freely move and zoom in the timeline by dragging and scrolling in the Timeline. Items can be created, edited, and deleted in the timeline. The time scale on the axis is adjusted automatically, and supports scales ranging from milliseconds to years.

Badges

GitHub contributors GitHub stars

Backers on Open Collective Sponsors on Open Collective

Install

Install via npm:

$ npm install vis-timeline

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="//unpkg.com/vis-timeline@latest/dist/vis-timeline-graph2d.min.js"></script>
  <link href="//unpkg.com/vis-timeline@latest/dist/vis-timeline-graph2d.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="visualization"></div>
<script type="text/javascript">
  // DOM element where the Timeline will be attached
  var container = document.getElementById('visualization');

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

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

  // Create a Timeline
  var timeline = new vis.Timeline(container, items, options);
</script>
</body>
</html>

Build

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

$ git clone git://github.com/visjs/vis-timeline.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-timeline
$ npm install

Then, the project can be build running:

$ npm run build

Excluding external dependencies

External dependencies such as moment, hammerjs can be excluded in the build by running:

$ npm run build -- -e [comma separated module names]

Example:

$ npm run build -- -e moment,hammerjs

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.