0

Given this fiddle how do i change the color of the text labels in the graph. They are currently white (e.g. Aziz).

I have tried with here but that does not work

text {
  fill: black;  
}

I finally got it with this here

.dc-chart g.row text {
  fill: black;  
}

Why do I need such a complicated selector? Is this the best way to achieve this?

Gordon
  • 19,811
  • 4
  • 36
  • 74
HattrickNZ
  • 4,373
  • 15
  • 54
  • 98
  • 1
    That is not bad practice - CSS would be my recommendation here, as you have it. – NickyTheWrench Sep 13 '16 at 00:01
  • 2
    I disagree with those voting to close based on this being opinion-based: at heart the question is asking why such complicated CSS is needed. I've edited the question to take out the language that makes it sound like it's asking for opinions rather than facts. My answer is also "yes, it's fine" but I'll just link to [dc.css](http://dc-js.github.io/dc.js/css/dc.css) for explanation. – Gordon Sep 13 '16 at 07:26

0 Answers0