Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change label text color in row chart

Tags:

svg

d3.js

dc.js

I am using dc.js row chart. Something exactly like the day of the week chart in the example of this page

Can someone please suggest how can I change the label colors from white to black.

like image 259
Andy897 Avatar asked Mar 29 '14 08:03

Andy897


2 Answers

I your CSS, use .dc-chart g.row text {fill: black;}.

like image 133
FernOfTheAndes Avatar answered Sep 21 '22 09:09

FernOfTheAndes


Furthermore, for those who try with pie charts, the selector for labels is without the g.row. i.e. : .dc-chart text.pie-slice {fill: black;}

like image 40
Arnaud Tiérant Avatar answered Sep 23 '22 09:09

Arnaud Tiérant