在具有多个数据集的 ngx-chart 中删除偶数、奇数 类?
Remove even, odd classes in ngx-chart with multiple data sets?
ngx-chart 中是否有配置去除下图中的灰色背景:https://embed.plnkr.co/2eQ9jheOTm8i74vp2EmP?show=preview
我认为你只需要使用 css 规则
.ngx-charts .grid-panel.odd rect {
fill: none;
}
在他们的 api 中没有禁用此功能的选项。
要避免使用 !important
,只需定义一个更具体的选择器。此外,您可能需要使用 ng-deep 来克服 angular 视图封装,但请记住它被标记为最终将被弃用的东西。
::ng-deep
.ngx-charts g .grid-panel.odd rect {
fill: none;
}
ngx-chart 中是否有配置去除下图中的灰色背景:https://embed.plnkr.co/2eQ9jheOTm8i74vp2EmP?show=preview
我认为你只需要使用 css 规则
.ngx-charts .grid-panel.odd rect {
fill: none;
}
在他们的 api 中没有禁用此功能的选项。
要避免使用 !important
,只需定义一个更具体的选择器。此外,您可能需要使用 ng-deep 来克服 angular 视图封装,但请记住它被标记为最终将被弃用的东西。
::ng-deep
.ngx-charts g .grid-panel.odd rect {
fill: none;
}