<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 它不显示图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  在开发JS过程中,会经常遇到两个小数相运算的情况,但是运算结果却与预期不同,调试一下发现计算结果竟然有那么长一串尾巴。如下图所示: 产生原因: JavaScript对小数运算会先转成二进制,运算完毕再转回十进制,过程中会有丢失,不过不是所有的小数间运算会
                  问题描述: 在javascript中引用js代码,然后导致反斜杠丢失,发现字符串中的所有\信息丢失。比如在js中引用input type=text onkeyup=value=value.replace(/[^\d]/g,) ,结果导致正则表达式中的\丢失。 问题原因: 该字符串含有\,javascript对字符串进行了转
                  Rails/Javascript: How to inject rails variables into (very) simple javascript(Rails/Javascript:如何将 rails 变量注入(非常)简单的 javascript)
                  CoffeeScript always returns in anonymous function(CoffeeScript 总是以匿名函数返回)
                  Ordinals in words javascript(javascript中的序数)
                  getFullYear returns year before on first day of year(getFullYear 在一年的第一天返回前一年)
                • <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>