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

Adding text label functionality #254

Open
Akirakato1 opened this issue Feb 12, 2020 · 4 comments
Open

Adding text label functionality #254

Akirakato1 opened this issue Feb 12, 2020 · 4 comments

Comments

@Akirakato1
Copy link

I found VivaGraphJS so I can visualize some data I generated through java. I'd like to be able to label the nodes with some text (not image) to represent the state. How will I do that. I'm looking for something like graph.addNode(1,"state A"), and also change the color of edge and node.
Sorry I've never done JavaScript so I'm looking for help here instead of spending hours searching.
Thanks.

@Akirakato1
Copy link
Author

@anvaka

@anvaka
Copy link
Owner

anvaka commented Feb 20, 2020

WebGL doesn't have means of rendering text. What I was usually doing is listen to node hover events and then just show Dom element on top.

If you are using SVG renderer you can just create a group and put both circle and text in there.

@Akirakato1
Copy link
Author

how can I set some edges to red and some to blue in same graph?

@Akirakato1
Copy link
Author

@anvaka Hi

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

2 participants