ngx-charts
ngx-charts copied to clipboard
Can't change text color on labels
Self explanatory...
Tried setting "color" css on the element and nothing. Makes it real hard to see on a dark-themed background
use fill instead
.pie-label { font-size: 11px; fill: red; }
Just to add what worked for me when trying to style from the component scss file:
::ng-deep .ngx-charts { text { fill: #fff !important; } }
Thanks to who posted this in another issue: https://github.com/swimlane/ngx-charts/issues/740#issuecomment-368643090
I have the same issue today and after a lot of research the only style that works for me was:
.ngx-charts, text { fill: #fff; }
Using ngx-charts version 19.2.
.legend-label-text { color: black !important; }