Giter Club home page Giter Club logo

vis's Introduction

vis.js (deprecated!)

This project is not maintained anymore! (See Issue #4259 for details)
We welcome you to use the libraries from the visjs community from now on.


Vis.js is a dynamic, browser based visualization library. The library is designed to be easy to use, handle large amounts of dynamic data, and enable manipulation of the data. The library consists of the following components:

  • DataSet and DataView. A flexible key/value based data set. Add, update, and remove items. Subscribe on changes in the data set. A DataSet can filter and order items, and convert fields of items.
  • DataView. A filtered and/or formatted view on a DataSet.
  • Graph2d. Plot data on a timeline with lines or barcharts.
  • Graph3d. Display data in a three dimensional graph.
  • Network. Display a network (force directed graph) with nodes and edges.
  • Timeline. Display different types of data on a timeline.

The vis.js library was initially developed by Almende B.V.

Install

Install via npm:

npm install vis

Install via bower:

bower install vis

Link via cdnjs: https://cdnjs.com/libraries/vis

Or download the library from the github project: https://github.com/almende/vis.git.

Load

To use a component, include the javascript and css files of vis in your web page:

<!DOCTYPE HTML>
<html>
<head>
  <script src="vis/dist/vis.min.js"></script>
  <link href="vis/dist/vis.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <script type="text/javascript">
    // ... load a visualization
  </script>
</body>
</html>

or load vis.js using require.js. Note that vis.css must be loaded too.

require.config({
  paths: {
    vis: 'path/to/vis/dist',
  }
});
require(['vis'], function (math) {
  // ... load a visualization
});

A timeline can be instantiated as:

var timeline = new vis.Timeline(container, data, options);

Where container is an HTML element, data is an Array with data or a DataSet, and options is an optional object with configuration options for the component.

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>Timeline basic demo</title>
  <script src="vis/dist/vis.min.js"></script>
  <link href="vis/dist/vis.min.css" rel="stylesheet" type="text/css" />

  <style type="text/css">
    body, html {
      font-family: sans-serif;
    }
  </style>
</head>
<body>
<div id="visualization"></div>

<script type="text/javascript">
  var container = document.getElementById('visualization');
  var data = [
    {id: 1, content: 'item 1', start: '2013-04-20'},
    {id: 2, content: 'item 2', start: '2013-04-14'},
    {id: 3, content: 'item 3', start: '2013-04-18'},
    {id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19'},
    {id: 5, content: 'item 5', start: '2013-04-25'},
    {id: 6, content: 'item 6', start: '2013-04-27'}
  ];
  var options = {};
  var timeline = new vis.Timeline(container, data, options);
</script>
</body>
</html>

Build

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

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

Then, the project can be build running:

npm run build

To automatically rebuild on changes in the source files, once can use

npm run watch

This will both build and minify the library on changes. Minifying is relatively slow, so when only the non-minified library is needed, one can use the watch-dev script instead:

npm run watch-dev

Custom builds

The folder dist contains bundled versions of vis.js for direct use in the browser. These bundles contain all the visualizations and include external dependencies such as hammer.js and moment.js.

The source code of vis.js consists of commonjs modules, which makes it possible to create custom bundles using tools like Browserify or Webpack. This can be bundling just one visualization like the Timeline, or bundling vis.js as part of your own browserified web application.

Note that hammer.js version 2 is required as of v4.

Prerequisites

Before you can do a build:

  • Install node.js and npm on your system: https://nodejs.org/
  • Install the following modules using npm: browserify, babelify, and uglify-js:
[sudo] npm install -g browserify babelify uglify-js
  • Download or clone the vis.js project:
git clone https://github.com/almende/vis.git
  • Install the dependencies of vis.js by running npm install in the root of the project:
cd vis
npm install

Examples of custom builds

Example 1: Bundle only a single visualization type

For example, to create a bundle with just the Timeline and DataSet, create an index file named custom.js in the root of the project, containing:

exports.DataSet = require('./lib/DataSet');
exports.Timeline = require('./lib/timeline/Timeline');

Then create a custom bundle using browserify, like:

browserify custom.js -t [ babelify --presets [es2015] ] -o dist/vis-custom.js -s vis

This will generate a custom bundle vis-custom.js, which exposes the namespace vis containing only DataSet and Timeline. The generated bundle can be minified using uglifyjs:

uglifyjs dist/vis-custom.js -o dist/vis-custom.min.js

The custom bundle can now be loaded like:

<!DOCTYPE HTML>
<html>
<head>
  <script src="dist/vis-custom.min.js"></script>
  <link href="dist/vis.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
  ...
</body>
</html>

Example 2: Exclude external libraries

The default bundle vis.js is standalone and includes external dependencies such as hammer.js and moment.js. When these libraries are already loaded by the application, vis.js does not need to include these dependencies itself too. To build a custom bundle of vis.js excluding moment.js and hammer.js, run browserify in the root of the project:

browserify index.js -t [ babelify --presets [es2015] ] -o dist/vis-custom.js -s vis -x moment -x hammerjs

This will generate a custom bundle vis-custom.js, which exposes the namespace vis, and has moment.js and hammer.js excluded. The generated bundle can be minified with uglifyjs:

uglifyjs dist/vis-custom.js -o dist/vis-custom.min.js

The custom bundle can now be loaded as:

<!DOCTYPE HTML>
<html>
<head>
  <!-- load external dependencies -->
  <script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.min.js"></script>
  <script src="http://cdnjs.cloudflare.com/ajax/libs/hammer.js/2.0.8/hammer.min.js"></script>

  <!-- load vis.js -->
  <script src="dist/vis-custom.min.js"></script>
  <link href="dist/vis.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
  ...
</body>
</html>

Example 3: Bundle vis.js as part of your (commonjs) application

When writing a web application with commonjs modules, vis.js can be packaged automatically into the application. Create a file app.js containing:

var moment = require('moment');
var DataSet = require('vis/lib/DataSet');
var Timeline = require('vis/lib/timeline/Timeline');

var container = document.getElementById('visualization');
var data = new DataSet([
  {id: 1, content: 'item 1', start: moment('2013-04-20')},
  {id: 2, content: 'item 2', start: moment('2013-04-14')},
  {id: 3, content: 'item 3', start: moment('2013-04-18')},
  {id: 4, content: 'item 4', start: moment('2013-04-16'), end: moment('2013-04-19')},
  {id: 5, content: 'item 5', start: moment('2013-04-25')},
  {id: 6, content: 'item 6', start: moment('2013-04-27')}
]);
var options = {};
var timeline = new Timeline(container, data, options);

The application can be bundled and minified:

browserify app.js -o dist/app-bundle.js -t babelify
uglifyjs dist/app-bundle.js -o dist/app-bundle.min.js

And loaded into a webpage:

<!DOCTYPE HTML>
<html>
<head>
  <link href="node_modules/vis/dist/vis.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <div id="visualization"></div>
  <script src="dist/app-bundle.min.js"></script>
</body>
</html>

Example 4: Integrate vis.js components directly in your webpack build

You can integrate e.g. the timeline component directly in you webpack build. Therefor you can e.g. import the component-files from root direcory (starting with "index-").

import { DataSet, Timeline } from 'vis/index-timeline-graph2d';

var container = document.getElementById('visualization');
var data = new DataSet();
var timeline = new Timeline(container, data, {});

To get this to work you'll need to add some babel-loader-setting to your webpack-config:

module: {
  module: {
    rules: [{
      test: /node_modules[\\\/]vis[\\\/].*\.js$/,
      loader: 'babel-loader',
      query: {
        cacheDirectory: true,
        presets: [ "babel-preset-es2015" ].map(require.resolve),
        plugins: [
          "transform-es3-property-literals", // #2452
          "transform-es3-member-expression-literals", // #2566
          "transform-runtime" // #2566
        ]
      }
    }]
  }
}

There is also an demo-project showing the integration of vis.js using webpack.

Test

To test the library, install the project dependencies once:

npm install

Then run the tests:

npm run test

License

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

Vis.js is dual licensed under both

and

Vis.js may be distributed under either license.

vis's People

Contributors

alexdm0 avatar areson avatar bradh avatar brendon1982 avatar btmorton avatar capitanmorgan avatar cdjackson avatar ckane avatar dturkenk avatar dude9177 avatar eymiha avatar felixhayashi avatar gillingham avatar grahamj avatar hansmaulwurf23 avatar josdejong avatar justinharrell avatar kannonboy avatar lewisjb avatar ludost avatar macleodbroad-wf avatar mdouailin avatar mojoaxel avatar ponml avatar simo9000 avatar stexxen avatar tooa avatar wimrijnders avatar yotamberk avatar zacbrownband avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vis's Issues

color.highlight for edges

It will be really cool if I could set a color for selected edges (selected node's edges).

Thanks!

Hyperlinking from a timeline

Hi,

Firstly thank you for your amazing work. I'm a student currently using Vis.js to represent dynamic data within an xslt page. I have managed to get everything up and displaying, but I can't seem to work out how to do a hyperlink.

I've tried a href, the elongated a attribute method for xsl and passing the a href statement as a variable into the contents section. None of which has given me any luck.

Any help is greatly appreciated,
Trent.

Feature propose for Graphs: Initialize with zoom extent option

It will be great if there will be an option that the graphs will initially appear in the zoom extended mode (like the zoom extent option in the navigation controls) after stabilization.

Even with "stabilize: true" it sometimes appears with too high zoom and only part of the graph is shown.

Thanks!

Timeline - compress data/time range

Congratulations for the excellent work.
Wonder if it is possible to set the range of dates / times (example at night)
to compress visually.

thanks

height option doesnt work when using groups

Any time you set the height option on the timeline while also using groups, the height appears to only apply to the first group instead of the entire timeline

This can be demonstrated by taking the http://visjs.org/examples/timeline/05_groups.html and simply adding the height option as done below.

<!doctype html>
<html>
<head>
    <title>Timeline | Basic demo</title>
    <script src="http://visjs.org/vis.js"></script>

    <style type="text/css">
        body, html {
            font-family: sans-serif;
        }
    </style>
</head>
<div id="visualization"></div>

<script>
    var now = moment().minutes(0).seconds(0).milliseconds(0);
    var groupCount = 3;
    var itemCount = 20;

    // create a data set with groups
    var names = ['John', 'Alston', 'Lee', 'Grant'];
    var groups = new vis.DataSet();
    for (var g = 0; g < groupCount; g++) {
        groups.add({id: g, content: names[g]});
    }

    // create a dataset with items
    var items = new vis.DataSet();
    for (var i = 0; i < itemCount; i++) {
        var start = now.clone().add('hours', Math.random() * 200);
        var group = Math.floor(Math.random() * groupCount);
        items.add({
            id: i,
            group: group,
            content: 'item ' + i +
                    ' <span style="color:#97B0F8;">(' + names[group] + ')</span>',
            start: start,
            type: 'box'
        });
    }

    // create visualization
    var container = document.getElementById('visualization');
    var options = {
        groupsOrder: 'content',
        height: 700
    };

    var timeline = new vis.Timeline(container);
    timeline.setOptions(options);
    timeline.setGroups(groups);
    timeline.setItems(items);

</script>
</body>
</html>

Timeline: attach end of item to current time future

Would be nice to be able to attach 'end' of item to 'update function' of current time with build in functionality. So if you monitor the page without refreshing, it will show items in the present tense.

Setting rootpanel border to none stops updating

Phew .. this was a hard one to track down.

Setting the rootpanel border to none in css inside the BODY TAGS, stops the timeline from updating. If you place it inside the HEAD tags it works.

So this DOESN'T work...

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title>Timeline | Basic demo</title>
    <style type="text/css">
        body, html {
            font-family: sans-serif;
        }
    </style>
    <script type="text/javascript" src="/_base/assets/plugins/vis/dist/vis.js"></script>
    <link href="/_base/assets/plugins/vis/dist/vis.min.css" rel="stylesheet" />
</head>
<body>
    <style type="text/css">
        .vis.timeline.rootpanel {
            border: none;
        }
    </style>

    <div id="visualization"></div>
    <script type="text/javascript">
        var container = document.getElementById('visualization');
        var items = [
    { id: 1, content: 'item 1', start: '2013-04-20' },
    { id: 2, content: 'item 2', start: '2013-04-14' },
    { id: 3, content: 'item 3', start: '2013-04-18' },
    { id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19' },
    { id: 5, content: 'item 5', start: '2013-04-25' },
    { id: 6, content: 'item 6', start: '2013-04-27' }
        ];
        var options = {};
        var timeline = new vis.Timeline(container, items, options);
    </script>
</body>
</html>

This DOES work...

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title>Timeline | Basic demo</title>
    <style type="text/css">
        body, html {
            font-family: sans-serif;
        }

        .vis.timeline.rootpanel {
            border: none;
        }
    </style>
    <script type="text/javascript" src="/_base/assets/plugins/vis/dist/vis.js"></script>
    <link href="/_base/assets/plugins/vis/dist/vis.min.css" rel="stylesheet" />
</head>
<body>
    <div id="visualization"></div>
    <script type="text/javascript">
        var container = document.getElementById('visualization');
        var items = [
    { id: 1, content: 'item 1', start: '2013-04-20' },
    { id: 2, content: 'item 2', start: '2013-04-14' },
    { id: 3, content: 'item 3', start: '2013-04-18' },
    { id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19' },
    { id: 5, content: 'item 5', start: '2013-04-25' },
    { id: 6, content: 'item 6', start: '2013-04-27' }
        ];
        var options = {};
        var timeline = new vis.Timeline(container, items, options);
    </script>
</body>
</html>

Since I'm using the timeline in partial vies in MVC, I would prefer being able to set the rootpanel border inside the body tags.

Don't know if there's a better way to remove the border?

:)

Navigation controls "glow effect" with keyboard

Hi guys,

I thought that it could be nice if the navigation control buttons will have the "glow effect" on every keypress (only when the keyboard option is enabled of course) like on mouseover.
It's really nice to have and not that important...

Thanks!

className not setting for items in Timeline groups

Hi, I was trying to set the classname for items, but it doesn't show up when I inspect the element in Firebug. It works when I add it to groups.

This is the code I was trying:
// create a data set with groups
var names = ['Alston', 'John', 'Lee', 'Grant'];
var groups = new vis.DataSet();
for (var g = 0; g < groupCount; g++) {
groups.add({ id: g, content: names[g], className: names[g] });
}

        // create a dataset with items
        var items = new vis.DataSet();
        for (var i = 0; i < itemCount; i++) {
            var start = now.clone().add('hours', Math.random() * 200);
            var group = Math.floor(Math.random() * groupCount);
            var classname = Math.floor(Math.random() * groupCount);
            items.add({
                id: i,
                group: group,
                content: 'hello' + group,
                start: start,
                type: 'box',
                className: names[classname]
            });
        }

I gave it a small stylesheet to test.
.Lee
{
background-color: #E6F367;
border-color: #E6F367;
}

the group 'Lee' gets the yellow background, but the items don't look like they have the class' Lee'. Am I missing something here?

Thanks,
Meghna

Change timeline timezone

Is there a way/planned way to be able to toggle what timezone the timeline uses? It would be very useful for me to be able to toggle the display from localtime as it defaults into UTC.

Can i draw multi lines between nodes?

Thanks for the awesome js lib :)

The tiny little thing i want is two lines between nodes.

if i put the edge like this,

edges.push({
from : 1,
to : 2,
length : LENGTH_MAIN,
color : 'red',
label : "bad",
style : "arrow"
});
edges.push({
from : 2,
to : 1,
length : LENGTH_MAIN,
color : 'green',
label : "ANOTHER",
style : "arrow"
});

it only shows one :(

Options height = 100% crashes all browsers

If I fx in the 01_basic.html example file, sets options with height = 100%, then alle browsers crashes IE, Chrome, etc). If I set it to 100%, then I will have to set (css) body height and the div height to 100% as well.

This code crashes the browser...

<!DOCTYPE HTML>
<html>
<head>
  <title>Timeline | Basic demo</title>

  <style type="text/css">
    body, html {
      font-family: sans-serif;
    }
  </style>

  <script src="../../dist/vis.js"></script>
  <link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="visualization"></div>

<script type="text/javascript">
  var container = document.getElementById('visualization');
  var items = [
    {id: 1, content: 'item 1', start: '2013-04-20'},
    {id: 2, content: 'item 2', start: '2013-04-14'},
    {id: 3, content: 'item 3', start: '2013-04-18'},
    {id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19'},
    {id: 5, content: 'item 5', start: '2013-04-25'},
    {id: 6, content: 'item 6', start: '2013-04-27'}
  ];
  var options = {
            height: '100%'
        };
  var timeline = new vis.Timeline(container, items, options);
</script>
</body>
</html>

This code works....

<!DOCTYPE HTML>
<html>
<head>
  <title>Timeline | Basic demo</title>

  <style type="text/css">
    body, html {
      font-family: sans-serif;
      height: 100%;
    }

    #visualization {        
        height: 100%;
    }
  </style>

  <script src="../../dist/vis.js"></script>
  <link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="visualization"></div>

<script type="text/javascript">
  var container = document.getElementById('visualization');
  var items = [
    {id: 1, content: 'item 1', start: '2013-04-20'},
    {id: 2, content: 'item 2', start: '2013-04-14'},
    {id: 3, content: 'item 3', start: '2013-04-18'},
    {id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19'},
    {id: 5, content: 'item 5', start: '2013-04-25'},
    {id: 6, content: 'item 6', start: '2013-04-27'}
  ];
  var options = {
            height: '100%'
        };
  var timeline = new vis.Timeline(container, items, options);
</script>
</body>
</html>

Can this be fixed?
Thanks

Highlight today (or some other day) column

This is a feature request!
First of all let me tell you this library is really well designed and easy to use. It's a really nice job. Also the documentation and the examples are comprehensive and clear.

Now let's get to my request: I'm using the timeline with grouping like in the groups example (n. 5). I would like to change the background color for today so that it's clear what is happening today. Unfortunately I couldn't find any css or javascript way to do this at the moment.

Let me know your thoughts about this.
Thanks
Luigi

network measures (Graph)

Hi guys!
First of all, I want to thank you for your wonderful (and useful) library.
I use your library a lot (sna) and I was wondering if you can or will include any functions about network measures and/or indices (like density, connectivity, betweenness or centrality). I think it would be really useful for network analysis.
Anyway, thank you again and please keep developing this great tool.
Kind regards.

Do items in timeline groups support 'end' time?

Hi,
I am trying to give an end time to my items, and they aren't showing up.
Looks like they get added to the DataSet correctly though.
image

Is this by design, an issue or am I not doing this right?

Thanks,
Meghna

Graph selection

I'd like to be able to select also an edge of the graph and it would be nice to give back node/edge objects not only the id.

Adding an adaptive timestep

I've been using this library a lot for a project and it's really neat to see how quickly it's been getting updated and how much work has been done on it lately and I was thinking that I would like to contribute if possible. I'd like to look into the feasibility of implementing an adaptive time step for the graph layout. This addition would change the length of the renderTimestep based on the total energy of the system and should help to avoid local minima in layout. I also think that although tricky, implementing it should be relatively straight forward. Essentially, the timestep stays the same while the energy is decreasing, increases as the energy continues to decrease, and gets smaller if the energy increases from one tick to the next. A more in depth description of the method is described in section three of this paper: http://www.mathematica-journal.com/issue/v10i1/contents/graph_draw/graph_draw_3.html

If I were interested in implementing this, where could I get the sum of the current total forces in the current layout? I'm not an expert with javascript yet and I can't tell where I can grab that figure from. I could loop through all nodes and do a vector sum of fx and fy but I feel like that's already being done somewhere else and I would be adding unnecessary calculations.

I'd love to try and contribute to this project, even in a small way. Please let me know if this is something that you think can be done.

Navigation controls position

Hi,

The navigation controls are not positioned at the bottom corners of the canvas for different canvas sizes:

navigation

Thanks!

Fixed Layout

Hey, I have a question: Do you have an option for a static graph layout?
Thanks!

Left to right layout

Hi,

I love vis. It fits almost all my requirements perfectly. But, I have one issue: I use graphviz to generate the dot script with Left to Right Layout like this.

digraph G {
graph [ rankdir = LR, id = "viewport" ];
...
}

But, when I render it on html, vis ignores it, I assume. Can you tell me how it could be implemented ?

UPDATE: Saw a couple of test cases in the repo dealing with LR, but it doesn't work for my case.
Here's the graph:
screenshot 2013-12-03 18 18 35

Here's my dot file:
digraph G {
graph [ rankdir = LR, id = "viewport" ];
"CA1 LTP";
"pjacob-nuclear";
"pCREB";
"LTP";
"Neuronal death";
"dendritic complexity";
"palpha-CaMKII T286";
"CA1 LTD";
"CA1 synaptic transmission";
"hippocampal learning";
"NMDAR";
"visual learning";
"peIF2alpha";
"translation";
"CA1 LTP" -> "pjacob-nuclear" [ label = "0.125↑" ];
"pjacob-nuclear" -> "pCREB" [ label = "0.375↑↓" ];
"pjacob-nuclear" -> "LTP" [ label = "0.125↑" ];
"pjacob-nuclear" -> "Neuronal death" [ arrowhead = tee, label = "0.125↑" ];
"pjacob-nuclear" -> "dendritic complexity" [ label = "NaN" ];
"CA1 LTP" -> "palpha-CaMKII T286" [ style = "dashed", label = "0.1125↑" ];
"palpha-CaMKII T286" -> "CA1 LTP" [ label = "0.2421875↓" ];
"palpha-CaMKII T286" -> "CA1 LTD" [ style = "dashed", label = "0.1875↓" ];
"palpha-CaMKII T286" -> "CA1 synaptic transmission" [ label = "0.125↓" ];
"palpha-CaMKII T286" -> "hippocampal learning" [ label = "0.125↓" ];
"palpha-CaMKII T286" -> "NMDAR" [ style = "dashed", label = "0.125↓" ];
"palpha-CaMKII T286" -> "visual learning" [ label = "0.125↓" ];
"CA1 LTP" -> "peIF2alpha" [ style = "dashed", label = "0.125↑" ];
}

Minimum font size

I am creating a graph containing 40-50 nodes on a screen of a resolution 1920 x 1200. I have both the width and the height set to 100% but the graph only takes up about a 450px x 450px area in the middle of the page.

If I zoom in using the mouse wheel then the graph will take up the entire screen and looks great; is it possible to have the graph take up more space when it initially loads.

I have the font size set to 12 but they are much smaller than this. Is it possible to set a minimum font size to force the graph to take up more space? If not, is there another way to force the graph to be bigger?

Cheers,
Phil

Vis roadmap (wrt. chap-links) ?

Hi. Thanks a lot for your great software.

Is there any roadmap for vis wrt. chap-links ? I understand from #1 (comment) that you want to have a clean, generic and modular approach with vis.js, but are there any criteria for integration?

More specifically, I am interested in the timeline component. I need features that are in either implementation but not in both: the ClusterGenerator from chap-links (because stacking events does not scale with a great number of events), and the ability to specify the displayed groups from vis.js. Do you have any advice on the way to go?

Node position and movement disallowance

I have to add a new node but a specific location. After that I want my node to be movable. I use the update method to change the x, y to undefined, but it doesn't work. I can't drag the node.

Is there a specific way to write some in order to succeed that or not? Am I missing something?

status page?

Is there a status page? (not sure where else to go for this)

I was confused on another ticket whether a bug was resolved or not, and there are many features yet to be migrated from the old code, I understand. It would be helpful ----for everyone, I think---- if we can get some kind of update.

We acknowledge there is not enough time to devote to cool projects like this and I'd like to help if I can. For example, I am especially interested in MIN, MAX, START, END config settings right now.

I am probably NOT the kind of coder who can just grab stuff and get it done on my own... BUT... I can do a lot of work IF you can tell me what to do. Is this something where some section of code in the OLD version just needs to be copied to a specific spot(s?) in the NEW and tested? Maybe some repetitive process someone like me can crank out? If so, I am good at that kind of thing and might provide some manpower to help progress.

Either way, it would be good to know what the NEAR TERM... say, next 6 months.. MIGHT yield (accepted there are no promises). Just trying to get a sense of things.

I do appreciate your/everyone's work. I'd like to contribute but am in a quandary as to which direction is best for me right now.

thanks!

zoom and move container

I think that Range must be subscribed to 'div.groupset' for 'zoom' event (may be 'move' too), not to rootPanel, to give a chance to scroll timeline vertically on touch devices, when having a lot of groups. In other words: exclude 'div.label-set' from zoom/move mouse listeners

ClassName for items?

Hi,

In chap-links there's a "className" for items, so we can specify our own css on every item. Is that not possible in "vis"?

Thanks
:)

Multiple edges using hierarchical layout

Hi!! Great library by the way, thank you so much!

As the title states, is it possible to have multiple edges connecting two nodes but when using hierarchical layout? I'm using the hierarchical layout so I can assign levels for each node because I need to mantain an order in the nodes (left to right order) but in some cases I need to display two edges connecting two nodes. Is there any possibility to achieve this?

Thanks!!

Parallel smooth curved edges label overlap

I saw the issues about the overlapping multiple edges between the same 2 nodes, but the edge labels at that case are still overlapping even when the smooth curves option is on.

Is there any chance you can fix it by positioning the labels in the middle of the edges instead of the 2 nodes halfway?

Thanks!

jake building current broken (develop branch)

created ./vis.js
created ./vis.min.js
jake aborted.
ReferenceError: navigator is not defined
at /Users/gillingh/Code/vis-upstream/vis.js:70:28
at Object. (/Users/gillingh/Code/vis-upstream/vis.js:1447:3)
at s (/Users/gillingh/Code/vis-upstream/vis.js:26:227)
at /Users/gillingh/Code/vis-upstream/vis.js:26:278
at Object.hammerjs (/Users/gillingh/Code/vis-upstream/vis.js:3772:69)
at s (/Users/gillingh/Code/vis-upstream/vis.js:26:227)
at e (/Users/gillingh/Code/vis-upstream/vis.js:26:398)
at /Users/gillingh/Code/vis-upstream/vis.js:26:416
at a (/Users/gillingh/Code/vis-upstream/vis.js:25:54)
at Object. (/Users/gillingh/Code/vis-upstream/vis.js:25:231)

Can I disable the scroll inside the canvas div?

If i take the cursor to the canvas, scroll down and up, the canvas image gets bigger and small. In my application, this is very awkward, because it has a lot of info in this page. The user have to scoll down to see other infos, but it is zooming the canvas, if the cursor is inside the canvas div :(

Is there a option with this? I checked the api ref in your site. but it seems like doesn't have this option :(

and also, can i prevent dragging the image canvas?

Data Manipulation (Graph)

If using dataManipulation: true and graph.on('select'....), after click the edit button and then the close(x), the DIV will no longer update.

  var options = {
    stabilize: false,
    navigation: true,
    keyboard: true,  
    dataManipulation: true
  };


  graph.on('select', function(params) 
  {                    
      if (params.nodes>0)
      { 
          $('#info').load('".BASE_URL."/includes/ajax/getInfo.php?id=' + params.nodes );                
      }
  });

Thanks in advance.

On graph one node is always shorter than the others

visjs graph

I have built a graph. Everything is fine besides that node that is shorter than the others. Is there any way to fix that. My current physics options are the following

physics: {
barnesHut: {
enabled: true,
gravitationalConstant: -40000,
springLength:350
}
}

GWT wrapper

Is there some plans to make a GWT wrapper ?
Thanks !
Julien

Multiple edges from same node to other node

When we create a graph with multiple edges from same node to other node, the edges are overlapping each other.

Example:

var nodes = [
{id: 1, label: 'a', shape: 'image', image: 'a.png'},
{id: 2, label: 'b', shape: 'image', image: 'b.png'}
];

var edges = [
{id: 1, from: 1, to: 2, label: 'edge1', style: 'arrow'},
{id: 2, from: 1, to: 2, label: 'edge2', style: 'arrow'}
];

Vertical timeline

@josdejong Hi there, you mentioned with this issue almende/chap-links-library#157 that this new library would be suited for vertical timelines, is that still the case?

We most likely are needing a vertical timeline. Your CHAP Links Libarary's Timeline plugin seems to be suitable for our needs, though we would need it to render vertically. It's needed for a web application so we might be willing to put in the hours needed for refactoring the plugin to our needs.

Is vis.js more suitable for that purpose? How should we proceed with vertical timeline?

Bug in view group ?

the vertical line is not long the entire height
stops at the third group
thanks.

snap_note1

Is 'padding' and 'margin-item' working?

I've tried with this code, but it doesn change padding of items nor spacing between items.

Am I doing something wrong?

Here's my code...

<!DOCTYPE HTML>
<html>
<head>
  <title>Timeline | Basic demo</title>

  <style type="text/css">
    body, html {
      font-family: sans-serif;
    }
  </style>

  <script src="../../dist/vis.js"></script>
  <link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="visualization"></div>

<script type="text/javascript">
  var container = document.getElementById('visualization');
  var items = [
    {id: 1, content: 'item 1', start: '2013-04-20'},
    {id: 2, content: 'item 2', start: '2013-04-14'},
    {id: 3, content: 'item 3', start: '2013-04-18'},
    {id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19'},
    {id: 5, content: 'item 5', start: '2013-04-25'},
    {id: 6, content: 'item 6', start: '2013-04-27'}
  ];
  var options = {
    'padding': 1,
    'margin.item': 2
  };
  var timeline = new vis.Timeline(container, items, options);
</script>
</body>
</html>

:)
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.