错误:使用角度图表时,[type]不是函数

时间:2016-04-26 10:26:00

标签: angularjs charts

控制台出错:

angular.min.js:114TypeError: (intermediate value)[type] is not a function
at createChart (ADapp.js:559)
at Object.fn (ADapp.js:512)
at m.$digest (angular.min.js:138)
at m.$apply (angular.min.js:141)
at angular.min.js:21
at Object.invoke (angular.min.js:41)
at Ac.c (angular.min.js:20)
at Ac (angular.min.js:21)
at de (angular.min.js:20)
at HTMLDocument.<anonymous> (angular.min.js:306)

这是index.html

   <script src="~/Scripts/_jquery-2.2.0.min.js"></script>
   <script src="~/Scripts/angular.min.js"></script>
   <script src="~/Scripts/Chart.js"></script>
   <script src="~/AngularApp/js/ADapp.js"></script>
   <script src="~/AngularApp/js/ADapp.html.templates.js"></script>

尝试启用此图表:

    <canvas id="line" class="chart chart-line" chart-data="data" chart-labels="labels" chart-series="series" chart-click="onClick"></canvas>
我搞砸了什么?

更新:

通过将html从char-data更改为data

来修复

0 个答案:

没有答案