vis.js

Arrange nodes at specific location

末鹿安然 提交于 2021-02-11 12:40:14
问题 In the following vis-network I have 2 groups of nodes. I have separated the 2 groups of nodes into left and right side by accessing the node positions after generating a layput_as_tree . Then using visEvents drew an ellipse around the node groups to show the separation more defined as 2 cell structures. I would like to control the arrangement of the node positions. For example, some nodes need to be on the boundary of the ellipse, some at very center and some scattered around. Wondering if

Arrange nodes at specific location

℡╲_俬逩灬. 提交于 2021-02-11 12:39:45
问题 In the following vis-network I have 2 groups of nodes. I have separated the 2 groups of nodes into left and right side by accessing the node positions after generating a layput_as_tree . Then using visEvents drew an ellipse around the node groups to show the separation more defined as 2 cell structures. I would like to control the arrangement of the node positions. For example, some nodes need to be on the boundary of the ellipse, some at very center and some scattered around. Wondering if

Unable to fix position of two nodes in vis.js

冷暖自知 提交于 2021-01-28 10:25:03
问题 I am trying to fix the position of two nodes. They should be on top of each other, 400px apart in the y-dimension. var edges = [{ id:"1", fixed: {x:true, y:true}, x:0,y:-200 },{ id:"2", fixed: {x:true, y:true}, x:0,y:200 }, ...]; However, the position are not fixed and wander all over the place. This is the corresponding fiddle. Any ideas? 回答1: Maybe this workaround will work for you: 1) store nodes and edges in dataSets 2) set node positions on afterDrawing and update the dataSet network.on(

Unable to fix position of two nodes in vis.js

做~自己de王妃 提交于 2021-01-28 10:23:38
问题 I am trying to fix the position of two nodes. They should be on top of each other, 400px apart in the y-dimension. var edges = [{ id:"1", fixed: {x:true, y:true}, x:0,y:-200 },{ id:"2", fixed: {x:true, y:true}, x:0,y:200 }, ...]; However, the position are not fixed and wander all over the place. This is the corresponding fiddle. Any ideas? 回答1: Maybe this workaround will work for you: 1) store nodes and edges in dataSets 2) set node positions on afterDrawing and update the dataSet network.on(

Vis.js hoverNode not triggered

拜拜、爱过 提交于 2021-01-27 20:20:03
问题 There is a graph using Vis.js Network that consist of circles and edges between them. Hovering mouse over a circle is supposed to show a tooltip. Using Vis.js hoverNode and node.title (for tooltip content). When mouse is moving from empty space into a circle - it always works: However if mouse if moved over the edges neighter hoverNode nor 'blurNode` every triggered: Is this a bug? Are there any possible work-arounds? 来源: https://stackoverflow.com/questions/55748023/vis-js-hovernode-not

How to raise a click event for a vis.js Timeline (to get the result of a click when the clickToUse option is set to True)?

别来无恙 提交于 2020-06-17 12:40:35
问题 I have multiple timelines in a project that uses vis.js , generated by a PHP code. There is an option for timelines, called clickToUse , if which is set to True , it causes the specific timeline to get selected when the user clicks on the timeline, causing a shadowed outline appearing around it. I'm using an additional div header with title and various information regarding to the timeline below it. I would like to have the timeline selected from code (causing to have the shadowed outline)