prepare vue_visgraph component, with store, dataset and display basic graph

This commit is contained in:
2021-10-18 15:47:57 +02:00
parent 8be11314c3
commit 1b0c19a68f
11 changed files with 250 additions and 59 deletions

View File

@@ -1,32 +0,0 @@
import vis from 'vis-network/dist/vis-network.min';
require('./scss/vis.scss');
// create an array with nodes
let 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", cid: 1 },
]);
// create an array with edges
let 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
let container = document.getElementById("graph-relationship");
let data = {
nodes: nodes,
edges: edges,
};
let options = {};
//
let network = new vis.Network(container, data, options);

View File

@@ -1,5 +0,0 @@
div#graph-relationship {
margin: 2em auto;
height: 500px;
border: 1px solid lightgray;
}