-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Control on Link Length, Collision detection and Node spacing #2
Comments
Sorry @vasturiano for pushing this. Did you get a chance to check this ? |
Hi @Masrico, if the intention is to better adjust the proportions of the link lengths to the node sizes, I would suggest using This should yield a good visual balance. If, on the other hand, you actually need to modify the internal behavior of the forces that control the graph, you can do that using
Or even add an additional force that restricts the nodes to a particular bounding box, like:
|
Thanks for the suggestions @vasturiano and very quick responses. I have tried using nodeRelSize by increasing and decreasing the number but it is not effecting much on the nodes plot. Dont know how to access links in nodeCanvasObject, yes am using this for text representation, an example would be great. I tried using graph.d3Force('contain', function(box) { }); where the box gives me 0.7 and not really sure how to manipulate this. My graph config is as below. Graph.graphData(dataWithNodesAndEdges)
Also, wish the graph cools by itself without a cooldowntime but when i remove it, its becoming static quickly without proper node arrangements. Can you please give any suggestions on this config, if any examples to browse through ? |
Hi @Masrico, here's some answers to your questions:
|
thanks for all your suggestions and inputs. Will try various options given and check where the graph stands. |
@vasturiano
In the screen shot above you can see that the text node is overlapped by the circle nodes and limits the visibility of text. May be i create the circle arcs first and then created text nodes, but not sure how can that be achieved with the force geometry ? |
@Masrico the nodes are drawn in the order present in the supplied |
Thanks @vasturiano , |
@vasturiano Thanks for all the good work.
I am working on this graph with higher number of nodes. But when i have built it the nodes size is reduced a lot, i have custom sized it in nodeCanvasObject(). There are multiple groups and distance between this groups is increased a lot, which the groups come closer, can you please suggest how to get groups closer?
And the links length is also more, wish to control this, any suggestions ?
And i have fixed div, width and height and want my force graph not to cross those limits. I have checked collision detection example but that is not serving my purpose. Can you please suggest?
Note: have given all group names as "Sample Group" but all of them have different ids
The text was updated successfully, but these errors were encountered: