vis.js

Is is possible to have a bidirectional edge in Cytoscape.js?

↘锁芯ラ 提交于 2020-05-29 11:56:45
问题 I want to make a network graph that looks similar to this below image. Click on this link to view the image I have searched across and have not found a solution for this using Cytoscape. 回答1: Yes, you can create bidirectional edges in Cytoscape.js. First, the curve-styles of your edges should be different than 'haystack' (below I set it as 'straight'), because 'haystack' doesn't support edge endpoint arrows. Second, you need to specify source and target endpoint arrow shapes. Possible values

Vis.js - set graph label's font as bold

北慕城南 提交于 2020-05-29 10:52:05
问题 I use vis.js to display a graph. I know we can update the node with: nodes.update([{ id: 1, font: { color: "#0d8" } }]); However, I can't update the font weight, for example, with font.bold: true . I've also tried to use font.multi , but no luck. Can you show how to set existing label as bold? (potentially as normal back too) 回答1: You need to combine a couple of options to make it work. A. Set font option in node option: // in the option object nodes: { font: { // required: enables displaying

Javascript and vis.js: increase only array in document.getElementById without for loop

我是研究僧i 提交于 2020-04-30 11:48:33
问题 it is possible to increase only the array timelineData[n] without for, while loops, otherwise it would repeat the (document.getElementById('timeline') in the page! timeline = new vis.Timeline(document.getElementById('timeline'), timelineData[n], timelineOptions); timelineData[n] it is an Array that contains values ​​that I would need to represent a graphic timeline thanks! 来源: https://stackoverflow.com/questions/60252383/javascript-and-vis-js-increase-only-array-in-document-getelementbyid

Javascript and vis.js: increase only array in document.getElementById without for loop

∥☆過路亽.° 提交于 2020-04-30 11:47:06
问题 it is possible to increase only the array timelineData[n] without for, while loops, otherwise it would repeat the (document.getElementById('timeline') in the page! timeline = new vis.Timeline(document.getElementById('timeline'), timelineData[n], timelineOptions); timelineData[n] it is an Array that contains values ​​that I would need to represent a graphic timeline thanks! 来源: https://stackoverflow.com/questions/60252383/javascript-and-vis-js-increase-only-array-in-document-getelementbyid

Javascript and vis.js: increase only array in document.getElementById without for loop

a 夏天 提交于 2020-04-30 11:45:05
问题 it is possible to increase only the array timelineData[n] without for, while loops, otherwise it would repeat the (document.getElementById('timeline') in the page! timeline = new vis.Timeline(document.getElementById('timeline'), timelineData[n], timelineOptions); timelineData[n] it is an Array that contains values ​​that I would need to represent a graphic timeline thanks! 来源: https://stackoverflow.com/questions/60252383/javascript-and-vis-js-increase-only-array-in-document-getelementbyid

Javascript and vis.js: increase only array in document.getElementById without for loop

一世执手 提交于 2020-04-30 11:45:00
问题 it is possible to increase only the array timelineData[n] without for, while loops, otherwise it would repeat the (document.getElementById('timeline') in the page! timeline = new vis.Timeline(document.getElementById('timeline'), timelineData[n], timelineOptions); timelineData[n] it is an Array that contains values ​​that I would need to represent a graphic timeline thanks! 来源: https://stackoverflow.com/questions/60252383/javascript-and-vis-js-increase-only-array-in-document-getelementbyid

How do I update props on a manually mounted vue component?

醉酒当歌 提交于 2020-01-24 07:05:24
问题 Question: Is there any way to update the props of a manually mounted vue component/instance that is created like this? I'm passing in an object called item as the component's data prop. let ComponentClass = Vue.extend(MyComponent); let instance = new ComponentClass({ propsData: { data: item } }); // mount it instance.$mount(); Why I have a non vue 3rd party library that renders content on a timeline (vis.js). Because the rest of my app is written in vue I'm attempting to use vue components

Accessing node data in vis.js click handler

ぃ、小莉子 提交于 2020-01-22 14:00:19
问题 I am having a network graph of nodes and edges and would like to get the node data once it gets clicked. I currently have var network = new vis.Network(container, data, options); network.on( 'click', function(properties) { console.log('clicked node ' + properties.nodes); }); But this just gives me some internal id [105]. Is there a way to get the actual data that is associated with the node. 回答1: The node ids that you get in the properties is not "some internal id", but these are the id's of

SVG Foreign Object sizing inconsistent

徘徊边缘 提交于 2020-01-15 04:22:32
问题 I'm trying to make 2 html objects in SVGs and further use them inside Vis.js graphs. My first svg (Button) works as intended and looks good. My problem is that when I try to insert the table div the width/height are not what I have set them to be. Here's what I get: As you can see the button is larger than the red box even though the red box has a larger width and height (1000px x 800px versus 220px x 68px)! Here's my JavaScript: // THE RED BOX const tableComponent = `<svg xmlns="http://www

VISJS: save manipulated data to json

﹥>﹥吖頭↗ 提交于 2020-01-14 10:33:52
问题 I am using vis.js to create network graphs on a web page. My need is to store manipulated graphs to a database in JSON format, exporting the json from the network graph. I did not find any documentation about it, is it feasible to export vis.js network with manipulated data for storage (in either JSON or in a form convertable into JSON)? 回答1: As for data , here's my hacky way to extract it for storage (I'll try to cut off code bits irrelevant to the question): // get nodes and edges var nodes