Comments (5)
@ibnesayeed Do you have a link to reproduce the problem?
PS: Are you trying to make all nodes fixed or you need some of them to be positioned by vivagraph?
from vivagraphjs.
I have a JSON file that has pre-calculated X and Y positions of each node as well as color and other attributes are encoded in JSON itself. I want to apply one node at a time from JSON to the graph. The nature of my need is such that I cannot pre-render all the nodes in advance. Hence, all the nodes will be added dynamically on a constant layout. I will try to write a small example code that can reproduce this issue and I will post it here soon.
Thanks for the help!
from vivagraphjs.
Here is a fiddle http://jsfiddle.net/HE7tb/
Three nodes were supposed to be panted while only one node is being painted in this fiddle. and it throws error saying, "Uncaught TypeError: Cannot read property 'x' of undefined"
from vivagraphjs.
Fixed. If your example reflects what you are doing, you might also want to add a fake node before call to the renderer.run, and remove it afterwards. This trick will auto-center the graph: http://jsfiddle.net/HE7tb/2/
from vivagraphjs.
Thanks for the fix. You were really very helpful. And thanks again for the additional trick to auto-center the graph. I am closing this bug report. :-)
from vivagraphjs.
Related Issues (20)
- Feedback
- how many nodes can this graph support
- Feedback - WebAssembly
- Cannot render graph HOT 2
- Documentation?
- Bug with links
- Go to the link by clicking on the node. HOT 1
- Adding text label functionality HOT 4
- render images on nodes instead of squares
- ngraph dependencies and other dependencies versions
- Messaging between nodes' position to optimise layout
- Request to be added to the list of examples
- how to make hyperlink <a href > from node
- How to fix nodes coordinates
- when you click on an object it jumps
- Performance is not good!
- change image in webgl graph node
- Extend Options to add Custom Force-Directed Layouts
- Node icon images turn to green when nodes number exceed 15,000.
- Custom nodes get stacked on top of each other HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vivagraphjs.