Skip to content
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

Example of rendering from offline generated layout #30

Open
TodAmon opened this issue May 19, 2017 · 3 comments
Open

Example of rendering from offline generated layout #30

TodAmon opened this issue May 19, 2017 · 3 comments

Comments

@TodAmon
Copy link

TodAmon commented May 19, 2017

Very nice you show how to do offline layout for large graphs. Have not been able to find example demonstrating how to use this data and render in browser (ideally using three.js). Thanks.

@anvaka
Copy link
Owner

anvaka commented May 20, 2017

Hi Tod. Would something like this work: https://github.com/anvaka/ngraph.pixel/tree/master/demo/offline

?

@TodAmon
Copy link
Author

TodAmon commented May 22, 2017 via email

@gg4u
Copy link

gg4u commented Jun 2, 2017

Hi, me too finding useful this example!
A few questions:

graph.txt is already generated with IDs in hex numbers (N_0x3cba7e8b98d00):
my graph has nodes IDs as strings (like 'Mario' -> 'Ekaterina') do I need to convert nodes' IDs of string type to hex ? what would you suggest?

I need to add properties to links: proximity values: thinkness and colors will be rendered in function of link proximity.

Could you post an example for that?

I read in bundle.js your comments: what do they mean?

// We need to use "dumb" links, otherwise it will be slow
// Dumb links cannot be updated directly via properties. Have
// to use renderer.edgeView().setFromColor(), renderer.edgeView().setToColor(), etc.

Could you post an example on how to map labels?
In labels.json I see an array, can I simply store a dictionary to map strings to hex IDs ?
e.g. ['N_0x3cba7e8b98d00' : {'label' : 'Mario', 'nodeType' : 'player'}, ... ]

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants