Css 角度nvd3线形图上的黑色背景

Css 角度nvd3线形图上的黑色背景,css,d3.js,nvd3.js,linechart,Css,D3.js,Nvd3.js,Linechart,我正在尝试用angular-nvd3库实现angular D3折线图。我们正在使用AngularJS 1.6和ES6。这就是angular-nvd3的接线方式: app.js import angularnvd3 from '../node_modules/angular-nvd3/index'; export default angular.module('myApp', othermodules,..angularnvd3) . . this.linechartOptions = {

我正在尝试用angular-nvd3库实现angular D3折线图。我们正在使用
AngularJS 1.6
ES6
。这就是angular-nvd3的接线方式:

app.js

import angularnvd3 from '../node_modules/angular-nvd3/index';
export default angular.module('myApp', othermodules,..angularnvd3)
.
.
this.linechartOptions = {
    chart: {
      type: 'lineChart',
      height: 300,
      width:500,
      x: function(d){ return d.x },
      y: function(d){ return d.y },
      useInteractiveGuideline: true,
      xAxis: {
          axisLabel: 'X Label'
      },
      yAxis: {
          axisLabel: 'Y Label',
      },
    },
    title: {
      enable: true,
      text: 'Some text',
      css: {
        'font-size' : '15px',
        'font-weight' : 'bold',
        'text-align' : 'left'
      }
    },
};

this.linechartData = [{
    values: lineChartData,
    key: 'Some Key',
    color: '#1f77b4'
}]
controller.js

import angularnvd3 from '../node_modules/angular-nvd3/index';
export default angular.module('myApp', othermodules,..angularnvd3)
.
.
this.linechartOptions = {
    chart: {
      type: 'lineChart',
      height: 300,
      width:500,
      x: function(d){ return d.x },
      y: function(d){ return d.y },
      useInteractiveGuideline: true,
      xAxis: {
          axisLabel: 'X Label'
      },
      yAxis: {
          axisLabel: 'Y Label',
      },
    },
    title: {
      enable: true,
      text: 'Some text',
      css: {
        'font-size' : '15px',
        'font-weight' : 'bold',
        'text-align' : 'left'
      }
    },
};

this.linechartData = [{
    values: lineChartData,
    key: 'Some Key',
    color: '#1f77b4'
}]
template.html

<nvd3 options="controller.linechartOptions" data="controller.linechartData"></nvd3>

但是,图形会被绘制为黑色背景。

我指的是这些资源:


但是,我不知道如何删除黑色背景和创建填充区域的线条。我只需要查看上面提到的plunker中显示的折线图。

只需从
node_modules/nvd3/build/nv.d3.css
中包含
nv.d3.css
,它就会解决这个问题。

只需从
node_modules/nvd3/build/nv.d3.css
中包含
,它就会解决这个问题。

行填充css应该是
yourlineSelector{fill:none;}
行填充css应该是
yourlineSelector{fill:none;}
如果项目正在使用scss:In angular.json文件:`````` stylepreprocessions:“{”includePaths:[“node_modules/nvd3/build/”]},``最后,在style.scss文件中:```导入“nv.d3”```这正是我的问题,如果项目正在使用scss:angular.json文件中:```“StylePreprocessions”:{“includePaths”:[“node_modules/nvd3/build/“]},``最后,在style.scss文件中:```@import“nv.d3”```