nylen / d3-process-map

Web application to illustrate the relationships between objects in a process using d3.js.
MIT License
416 stars 196 forks source link

How to change rect text color? #23

Closed alexj28 closed 6 years ago

alexj28 commented 6 years ago

I am attempting to change the text color in the rect objects and have changed the .node text { color: property in the svg.css file. However, some bug is preventing the text color from changing. I would appreciate any help I could get with this.

Thank you.

nylen commented 6 years ago

Hi @alexj28,

SVG elements are styled a bit differently from other HTML elements. You need to use the fill property to accomplish this, fill: red; for example.

See also: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/text#Styling_text_via_CSS