VivaGraphJS icon indicating copy to clipboard operation
VivaGraphJS copied to clipboard

Adding text label functionality

Open Akirakato1 opened this issue 5 years ago • 4 comments

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 avatar Feb 12 '20 22:02 Akirakato1

@anvaka

Akirakato1 avatar Feb 19 '20 16:02 Akirakato1

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.

anvaka avatar Feb 20 '20 18:02 anvaka

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

Akirakato1 avatar Feb 20 '20 18:02 Akirakato1

@anvaka Hi

Akirakato1 avatar Mar 09 '20 14:03 Akirakato1