You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we took vis js network to its limit and it makes the app super slow, we did notice that if we drag the map out of the computer bounds the app is fast again. so my question is, can you make the vis graph spread so a small amount of nodes will be rendered? do i need to change the options?
below is my options object const options = { width: window.innerWidth + 'px', height: window.innerHeight + 'px', interaction: { hover: true }, edges: { arrows: { to: { enabled: false, }, }, width: 4, length: 100, font: { color: '#ffffff', size: 40, // px face: 'arial', background: 'none', strokeWidth: 1, // px strokeColor: '#ffffff', align: 'horizontal', multi: false, vadjust: 0, }, }, nodes: { shapeProperties: { useBorderWithImage: false, // only for image shape }, imagePadding: { top: 10, bottom: 10, left: 10, right: 10 }, size: 40, // shape: "circularImage", font: '14px Helvetica white', borderWidth: 2, color: { border: 'white', hover: { border: 'yellow', background: 'grey', }, }, opacity: 1, }, physics: { enabled: true, barnesHut: { springConstant: 0, avoidOverlap: 0.2, }, stabilization: { enabled: true, iterations: 20, }, }, layout: { improvedLayout: true, hierarchical: { enabled: false, levelSeparation: 450, nodeSpacing: 400, treeSpacing: 500, blockShifting: true, edgeMinimization: true, parentCentralization: true, direction: 'UD', // UD, DU, LR, RL sortMethod: 'hubsize', // hubsize, directed shakeTowards: 'leaves', // roots, leaves }, }, }
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
we took vis js network to its limit and it makes the app super slow, we did notice that if we drag the map out of the computer bounds the app is fast again. so my question is, can you make the vis graph spread so a small amount of nodes will be rendered? do i need to change the options?
below is my options object
const options = { width: window.innerWidth + 'px', height: window.innerHeight + 'px', interaction: { hover: true }, edges: { arrows: { to: { enabled: false, }, }, width: 4, length: 100, font: { color: '#ffffff', size: 40, // px face: 'arial', background: 'none', strokeWidth: 1, // px strokeColor: '#ffffff', align: 'horizontal', multi: false, vadjust: 0, }, }, nodes: { shapeProperties: { useBorderWithImage: false, // only for image shape }, imagePadding: { top: 10, bottom: 10, left: 10, right: 10 }, size: 40, // shape: "circularImage", font: '14px Helvetica white', borderWidth: 2, color: { border: 'white', hover: { border: 'yellow', background: 'grey', }, }, opacity: 1, }, physics: { enabled: true, barnesHut: { springConstant: 0, avoidOverlap: 0.2, }, stabilization: { enabled: true, iterations: 20, }, }, layout: { improvedLayout: true, hierarchical: { enabled: false, levelSeparation: 450, nodeSpacing: 400, treeSpacing: 500, blockShifting: true, edgeMinimization: true, parentCentralization: true, direction: 'UD', // UD, DU, LR, RL sortMethod: 'hubsize', // hubsize, directed shakeTowards: 'leaves', // roots, leaves }, }, }
Beta Was this translation helpful? Give feedback.
All reactions