0
我對chart.js之正與Angular.JS我的角度應用程序正在尋找像下面
angular.module('inspinia').controller('dashboardController', ['$rootScope', '$scope', '$http','chart.js', function($rootScope, $scope, $http) {
console.log("123");
$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]];
我的HTML代碼正在尋找像下面
<div class="text-center">
<canvas id="bar" class="chart chart-bar"chart-data="data" chart-labels="labels"> chart-series="series"
</canvas>
</div>
我得到兩個錯誤
Uncaught TypeError: Cannot set property 'mode' of undefined
等是
Error: [$injector:unpr]
http://errors.angularjs.org/1.5.0/ $injector/unpr?p0=chart.jsProvider%20%3C-hart.js%20%3C-%dashboardController
請幫我這個
在此先感謝
感謝回答我已經r eferd庫在我的Angular應用程序中。 –
我用你的代碼替換了我的代碼,但得到相同的錯誤 –
@AbhishekParikh你有teamvieweR嗎? – Sajeetharan