Recently, I attempted to utilize angular-charts from their documentation available at
I successfully integrated angular-chart.js, chart.js, and angular-chart.css. Furthermore, I also included 'chart.js' in the angular module. However, I encountered an error stating "Chart is not defined." Unfortunately, I am unable to pinpoint why this issue is arising.
Here is a snippet of my code :
angular.module('mean.system',['ui.bootstrap','chart.js']);
Within the controller :
$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]
];
In the HTML section :
<link href="css/angular-chart.css" rel="stylesheet">
<script type="text/javascript" src="/js/angular-chart.js"></script>
<script type="text/javascript" src="/js/Chart.js"></script>
<canvas id="bar" class="chart chart-bar" data="data"
labels="labels"></canvas>
The browser console displayed the following error message :
ncaught ReferenceError: Chart is not definedChart.defaults.global.responsive @ angular-chart.js:11(anonymous function) @ angular-chart.js:13
angular.js:78 Uncaught Error: [$injector:modulerr] Failed to instantiate module mean due to:
Error: [$injector:modulerr] Failed to instantiate module chart.js due to:
Error: [$injector:nomod] Module 'chart.js' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.2.6/$injector/nomod?p0=chart.js...