D3 tree/cluster diagram - changing node text color

Viewed 3176

I would like to have diagram similar to this one: (the most important part is that I would like to have node text displayed in several colors; it doesn't matter whether the diagram is tree or cluster)

enter image description here

This is a test example:

jsfiddle

enter image description here

I tried changing text color via CSS, and within JavaScript code, bit it always remains black. Why?

1 Answers
Related