diff --git a/static/depviz.js b/static/depviz.js index 4e0ff4725..90b6f2d74 100644 --- a/static/depviz.js +++ b/static/depviz.js @@ -18,6 +18,18 @@ $(document).ready(function() { let node = { id: task.id, label: task.local_id, + multi: true, + shape: 'box', + } + switch (task.kind) { + case "Issue": + node.color = "lightblue"; + break; + case "Milestone": + node.color = "lightgreen"; + break; + default: + console.log("unknown task.kind", task) } //if (task.has_owner !== undefined) { edges.push({from: task.has_owner, to: task.id}) } //if (task.has_author !== undefined) { edges.push({from: task.has_author, to: task.id}) } @@ -51,10 +63,22 @@ $(document).ready(function() { // create a network var container = document.getElementById('network'); var data = { - nodes: new vis.DataSet(nodes), - edges: new vis.DataSet(edges), + nodes: nodes, + edges: edges, + }; + var options = { + edges: { + smooth: { + forceDirection: 'none', + roundness: 0.8, + }, + }, + physics: { + //minVelocity: 0.1, + solver: 'repulsion', + stabilization: false, + }, }; - var options = {}; var network = new vis.Network(container, data, options); console.log("network", network); },