Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 角度Nvd3-无效的<;g>;属性转换=";翻译(0,NaN)";_Javascript_Angularjs_Nvd3.js_Angularjs Nvd3 Directives_Angular Nvd3 - Fatal编程技术网

Javascript 角度Nvd3-无效的<;g>;属性转换=";翻译(0,NaN)";

Javascript 角度Nvd3-无效的<;g>;属性转换=";翻译(0,NaN)";,javascript,angularjs,nvd3.js,angularjs-nvd3-directives,angular-nvd3,Javascript,Angularjs,Nvd3.js,Angularjs Nvd3 Directives,Angular Nvd3,我将“Multichart”与Angular Nvd3指令一起使用,我不断收到以下错误信息: 错误:属性transform=“translate(0,NaN)”的值无效 我不知道为什么会这样 我的HTML代码如下所示: <nvd3 options="options" data="data"></nvd3> $scope.options = { chart: { type: 'multiChart',

我将“Multichart”与Angular Nvd3指令一起使用,我不断收到以下错误信息:

错误:属性transform=“translate(0,NaN)”的值无效

我不知道为什么会这样

我的HTML代码如下所示:

<nvd3 options="options" data="data"></nvd3>
  $scope.options = {
             chart: {
                 type: 'multiChart',
                 height: 450,
                 margin : {
                     top: 30,
                     right: 60,
                     bottom: 50,
                     left: 70
                 },
                 color: d3.scale.category10().range(),
                 //useInteractiveGuideline: true,
                 transitionDuration: 500,
                 xAxis: {
                     tickFormat: function(d){
                         return d3.format(',f')(d);
                     }
                 },
                 yAxis1: {
                     tickFormat: function(d){
                         return d3.format(',.1f')(d);
                     }
                 },
                 yAxis2: {
                     tickFormat: function(d){
                         return d3.format(',.1f')(d);
                     }
                 }
             }
         };

         $scope.data = [
           {
             key: "Stream0",
             originalKey: "Stream0",
             type: "area",
             yAxis: 1,
             seriesIndex: 0,
             values: [
               {
                 x:0,
                 y:1000,
                 index: 0,
                 seriesIndex: 0,
                 series: 0
               },
               {
                 x:1,
                 y:300,
                 index: 1,
                 seriesIndex: 0,
                 series: 0
               },
               {
                 x:2,
                 y:4000,
                 index: 2,
                 seriesIndex: 0,
                 series: 0
               },
               {
                 x:3,
                 y:5000,
                 index: 3,
                 seriesIndex: 0,
                 series: 0
               }
             ]
           }
         ];

请帮我解决这个问题,如果您有任何建议,我们将不胜感激。

您能添加到plunker/jsfiddle/的链接吗?我无法使用最新的Angular、D3、nvd3和Angular-nvd3库来重现这一点。您正在使用这些库的哪些版本?@LukeWoodward我正在使用NVD3-v1.1.15-beta@martin:其余的呢?我正在使用AngularJS 1.4.4、d3版本3.5.6、nvd3 v1.8.1-dev和angular-nvd3 1.0.0-rc2。@LukeWoodward AngularJS v1.4.3和angular nvd3 0.1.0,我找不到d3版本,你知道在哪里可以找到它吗?你能添加到plunker/jsfiddle/的链接吗?我无法使用最新的Angular、D3、nvd3和Angular-nvd3库来重现这一点。您正在使用这些库的哪些版本?@LukeWoodward我正在使用NVD3-v1.1.15-beta@martin:其余的呢?我正在使用AngularJS 1.4.4、d3版本3.5.6、nvd3 v1.8.1-dev和angular-nvd3 1.0.0-rc2。@LukeWoodward AngularJS v1.4.3和angular nvd3 0.1.0,我找不到d3版本,你知道我在哪里可以找到它吗?