dhotson / springy

A force directed graph layout algorithm in JavaScript
http://getspringy.com
MIT License
1.88k stars 240 forks source link

Changing text color and size for nodes using JSON and springyui #76

Closed AlpOzturk closed 9 years ago

AlpOzturk commented 9 years ago

When creating a force directed graph via JSON and springyui, what can I do configure the text size and color for the nodes? I have a hang on manipulating edge properties, but nodes seem trickier.

dhotson commented 9 years ago

From memory, you should be able to give nodes a color and font property to set the label's color and font.

e.g.

graph.newNode({label: 'Hello', color: '#FF0000', font: '16px Verdana'});