Loturno
Loturno

Reputation: 21

ngx-charts-gauge title color is unable to modify

I'm trying to add ngx-charts-gauge on angular5 app page.

Following these : https://swimlane.gitbooks.io/ngx-charts/content/charts/gauge.html

Everything works fine except I don't find any way or attribute or info to change Big center title color...It stills black !

I tried to override css class...with no chance.

.chart-container {
  color: white;
}

Any help would be appreciated.

Thanks.

Upvotes: 1

Views: 1682

Answers (1)

Mateen
Mateen

Reputation: 1671

Change your css as below it will work

:host /deep/ .chart-container {
  color: white;
}

OR

:host ::ng-deep .chart-container {
  color: white;
}

Reason: Component style only applies to the html in component.

To force a style down to the child component use /deep/

documentation, another reference

Upvotes: 1

Related Questions