Html 没有显示任何图形

Html 没有显示任何图形,html,angularjs,plot,graph,Html,Angularjs,Plot,Graph,我正在运行此代码,但输出中没有任何内容。没有错误的积累,但我无法找出错误。谁能告诉我问题出在哪里??问候 <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <script src="Dependencies/Angular/angular.js"></script> <script src="Dependencies/D3/d3.

我正在运行此代码,但输出中没有任何内容。没有错误的积累,但我无法找出错误。谁能告诉我问题出在哪里??问候

  <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />

    <script src="Dependencies/Angular/angular.js"></script>
    <script src="Dependencies/D3/d3.js"></script>
    <script src="Dependencies/nvd3/nv.d3.js"></script>
    <script src="Dependencies/Angularjs-nvd3-Directives/angularjs-nvd3-directives.js"></script>
    <link rel="stylesheet"href="Dependencies/nvd3/nv.d3.css">


    <script>
        var app = angular.module("nvd3TestApp", ['nvd3ChartDirectives']);

        function ExampleCtrl($scope){
            $scope.exampleData = [
                {
                    "key": "Series 1",
                    "values": [ [ 1025409600000 , 0]  , [ 1309406400000 , 121.92388706072] , [ 1312084800000 , 116.70036100870] , [ 1314763200000 , 88.367701837033] , [ 1317355200000 , 59.159665765725] , [ 1320033600000 , 79.793568139753] , [ 1322629200000 , 75.903834028417] , [ 1325307600000 , 72.704218209157] , [ 1327986000000 , 84.936990804097] , [ 1330491600000 , 93.388148670744]]
                }];

        }
    </script>

</head>
<body ng-app='nvd3TestApp'>


    <div ng-controller="ExampleCtrl">
        <nvd3-line-chart data="exampleData"
                         showXAxis="true"
                         showYAxis="true"
                         tooltips="true"
                         interactive="true">
        </nvd3-line-chart>

    </div>

</body>
</html>

var-app=angular.module(“nvd3TestApp”,['NVD3ChartDirections']);
函数ExampleCtrl($scope){
$scope.exampleData=[
{
“密钥”:“系列1”,
“价值”:[[1025409600000,0],[1309406400000,121.92388706072],[1312084800000,116.70036100870],[1314763200000,88.367701837033],[1317355200000,59.159665765725],[1320033600000,79.793568139753],[1322629200000,75.90383402817],[1325307600000,72.704218209157],[1327986000000,84.9369904097],[ 1330491600000 , 93.388148670744]]
}];
}

作为控制器的全局函数在angular中已经有很长一段时间不受支持了…大约从
1.2xx开始

试一试


作为控制器的全局函数在angular中已经有很长一段时间不受支持了…大约从
1.2xx开始

试一试


我相信我已经解决了您的代码问题。我没有加载任何css,因此您可能必须添加您的css以使其看起来正确。我还将在关闭
标记之前移动您的脚本标记。这样,您的代码将不会在加载dom之前运行。这将防止将来出现一些麻烦

现场预览:

JavaScript/角度代码:

var app = angular.module("nvd3TestApp", ['nvd3ChartDirectives']).controller("ExampleCtrl", function($scope) {


  $scope.exampleData = [{
    "key": "Series 1",
    "values": [
      [1025409600000, 0],
      [1309406400000, 121.92388706072],
      [1312084800000, 116.70036100870],
      [1314763200000, 88.367701837033],
      [1317355200000, 59.159665765725],
      [1320033600000, 79.793568139753],
      [1322629200000, 75.903834028417],
      [1325307600000, 72.704218209157],
      [1327986000000, 84.936990804097],
      [1330491600000, 93.388148670744]
    ]
  }];

})();

我相信我已经解决了您的代码问题。我没有加载任何css,因此您可能必须添加您的css以使其看起来正确。我还将在关闭
标记之前移动您的脚本标记。这样,您的代码将不会在加载dom之前运行。这将防止将来出现一些麻烦

现场预览:

JavaScript/角度代码:

var app = angular.module("nvd3TestApp", ['nvd3ChartDirectives']).controller("ExampleCtrl", function($scope) {


  $scope.exampleData = [{
    "key": "Series 1",
    "values": [
      [1025409600000, 0],
      [1309406400000, 121.92388706072],
      [1312084800000, 116.70036100870],
      [1314763200000, 88.367701837033],
      [1317355200000, 59.159665765725],
      [1320033600000, 79.793568139753],
      [1322629200000, 75.903834028417],
      [1325307600000, 72.704218209157],
      [1327986000000, 84.936990804097],
      [1330491600000, 93.388148670744]
    ]
  }];

})();

好的,注意到了。谢谢:)好的,注意到了。谢谢:)这是折线图,但不是散点图。我正在使用,但没有任何回报。有什么想法吗?我会看一看。这是折线图,但不是散点图。我正在使用,但没有任何回报。有什么想法吗?我会看一看。