我正在使用angular-chart.js在我的應用程序中繪製圖表。但是我面臨一個問題。圖表圖例顯示未定義而不是標籤。圖表顯示未定義的角度圖
我JS代碼:
$scope.labels_std = ['Total Students', 'Submitted fee', 'Has to submit'];
$scope.options = {legend: {display: true, position: 'bottom'}};
$scope.colors = ['#4D5360', '#949FB1', '#97BBCD'];
$scope.data_std = [
$scope.allCount.students,
$scope.allCount.fees,
$scope.allCount.students - $scope.allCount.fees
];
標記爲:
<canvas id="bar" class="chart chart-bar" chart-labels="labels_std" chart-data="data_std" chart-colors="colors" chart-options="options"></canvas>
但結果是這樣的:
才能添加工作實例,其中問題。另外在現有代碼 –
中的'$ scope.series'我添加了系列,但沒有工作 –
請參閱http://jtblin.github.io/angular-chart.js/,但添加一些plunker,以便它更容易調試 –