我正在使用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,以便它更容易调试 –