<small id='x771d'></small><noframes id='x771d'>

  • <i id='x771d'><tr id='x771d'><dt id='x771d'><q id='x771d'><span id='x771d'><b id='x771d'><form id='x771d'><ins id='x771d'></ins><ul id='x771d'></ul><sub id='x771d'></sub></form><legend id='x771d'></legend><bdo id='x771d'><pre id='x771d'><center id='x771d'></center></pre></bdo></b><th id='x771d'></th></span></q></dt></tr></i><div id='x771d'><tfoot id='x771d'></tfoot><dl id='x771d'><fieldset id='x771d'></fieldset></dl></div>
      • <bdo id='x771d'></bdo><ul id='x771d'></ul>
    1. <legend id='x771d'><style id='x771d'><dir id='x771d'><q id='x771d'></q></dir></style></legend>

        <tfoot id='x771d'></tfoot>

        Angular-Chart.js 它不显示图表

        Angular-Chart.js it doesn#39;t display the chart(Angular-Chart.js 它不显示图表)
        • <bdo id='zFuC9'></bdo><ul id='zFuC9'></ul>

            <small id='zFuC9'></small><noframes id='zFuC9'>

                • <tfoot id='zFuC9'></tfoot>
                  <i id='zFuC9'><tr id='zFuC9'><dt id='zFuC9'><q id='zFuC9'><span id='zFuC9'><b id='zFuC9'><form id='zFuC9'><ins id='zFuC9'></ins><ul id='zFuC9'></ul><sub id='zFuC9'></sub></form><legend id='zFuC9'></legend><bdo id='zFuC9'><pre id='zFuC9'><center id='zFuC9'></center></pre></bdo></b><th id='zFuC9'></th></span></q></dt></tr></i><div id='zFuC9'><tfoot id='zFuC9'></tfoot><dl id='zFuC9'><fieldset id='zFuC9'></fieldset></dl></div>
                    <tbody id='zFuC9'></tbody>
                • <legend id='zFuC9'><style id='zFuC9'><dir id='zFuC9'><q id='zFuC9'></q></dir></style></legend>
                  本文介绍了Angular-Chart.js 它不显示图表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试使用 Angular-chart.js它没有为我显示任何内容,这是我的 javascript 和 html 页面

                  I am trying to use Angular-chart.js it doesn't display anything for me here is my javascript and html page

                  (function(){
                   angular.module("app", ["chart.js"]).controller("BarCtrl", function ($scope) {
                      $scope.labels = ['2006', '2007', '2008', '2009', '2010', '2011', '2012'];
                      $scope.series = ['Series A', 'Series B'];
                  
                      $scope.data = [
                        [65, 59, 80, 81, 56, 55, 40],
                        [28, 48, 40, 19, 86, 27, 90]
                      ];
                   });
                  })(); 
                      

                  <!DOCTYPE html>
                  <html>
                  
                  <head>
                      <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
                      <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.2/Chart.min.js
                      "></script>
                      <link rel="stylesheet" href="https://cdn.jsdelivr.net/angular.chartjs/latest/angular-chart.css
                      " />
                      <script src="angular-chart.min.js
                      "></script>
                      <script src="app.js"></script>
                  </head>
                  
                  <body ng-app="app">
                      <div ng-controller="BarCtrl">
                          <canvas id="bar" class="chart chart-bar" chart-data="data" chart-labels="labels"></canvas>
                      </div>
                  
                  </body>
                  
                  </html>

                  我不明白错误在哪里,提前感谢您的帮助

                  I don't understand where the error is, thanks in advance for your help

                  推荐答案

                  angular-chart.js 好像不支持 Chart.js 的第 2 版.下面是一个片段,显示了一个工作图表.它包括chart.js的v1.1.1

                  It looks like angular-chart.js doesn't support version 2 of Chart.js. Below is a snippet, that shows a working chart. It includes v1.1.1 of chart.js

                  angular.module("app", ["chart.js"]).controller("BarCtrl", function($scope) {
                    $scope.labels = ['2006', '2007', '2008', '2009', '2010', '2011', '2012'];
                    $scope.series = ['Series A', 'Series B'];
                  
                    $scope.data = [
                      [65, 59, 80, 81, 56, 55, 40],
                      [28, 48, 40, 19, 86, 27, 90]
                    ];
                  });

                  <!DOCTYPE html>
                  <html>
                  
                  <head>
                    <script data-require="angularjs@1.5.3" data-semver="1.5.3" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.min.js"></script>
                    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.1.1/Chart.min.js"></script>
                    <script src="http://jtblin.github.io/angular-chart.js/dist/angular-chart.js"></script>
                    <link rel="stylesheet" href="https://raw.githubusercontent.com/jtblin/angular-chart.js/master/dist/angular-chart.min.css" />
                    <script src="app.js"></script>
                  </head>
                  
                  <body ng-app="app">
                    <div ng-controller="BarCtrl">
                      <canvas id="bar" class="chart chart-bar" chart-data="data" chart-labels="labels" chart-series="series"></canvas>
                    </div>
                  </body>
                  
                  </html>

                  这篇关于Angular-Chart.js 它不显示图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  ChartJS Version 3 - common legend for multiple line charts(ChartJS 版本 3 - 多个折线图的常用图例)
                  Charts.js scales yaxes ticks min max doesnt work(Charts.js 缩放 yaxes 刻度 min max 不起作用)
                  How to expand the slice of donut chart in chartjs?(如何在chartjs中扩展圆环图的切片?)
                  Chart.js yAxes Ticks stepSize not working (fiddle)(Chart.js yAxes Ticks stepSize 不起作用(小提琴))
                  Rounded corners on chartJS v.2 - bar charts (with negative values)(chartJS v.2 上的圆角 - 条形图(带负值))
                  How to hide value in Chart JS bar(如何在 Chart JS 栏中隐藏值)
                • <tfoot id='g0zJm'></tfoot>
                  <i id='g0zJm'><tr id='g0zJm'><dt id='g0zJm'><q id='g0zJm'><span id='g0zJm'><b id='g0zJm'><form id='g0zJm'><ins id='g0zJm'></ins><ul id='g0zJm'></ul><sub id='g0zJm'></sub></form><legend id='g0zJm'></legend><bdo id='g0zJm'><pre id='g0zJm'><center id='g0zJm'></center></pre></bdo></b><th id='g0zJm'></th></span></q></dt></tr></i><div id='g0zJm'><tfoot id='g0zJm'></tfoot><dl id='g0zJm'><fieldset id='g0zJm'></fieldset></dl></div>

                      <tbody id='g0zJm'></tbody>
                      1. <legend id='g0zJm'><style id='g0zJm'><dir id='g0zJm'><q id='g0zJm'></q></dir></style></legend>

                        <small id='g0zJm'></small><noframes id='g0zJm'>

                            <bdo id='g0zJm'></bdo><ul id='g0zJm'></ul>