我使用 Angular-Chart.js(AngularJSChart.js http://www.chartjs.org/版本)来创建条形图。图表正在使用除颜色之外的选项。
即使我设置了它们,它也会显示在文档中 http://jtblin.github.io/angular-chart.js/#bar-chart,它们保持灰色。
<div class="graph-display" ng-controller="chartController">
<canvas class="chart chart-bar"
data="bilans.data"
labels="bilans.labels"
series="bilans.series"
options="{
scaleShowHorizontalLines: true,
scaleShowVerticalLines: false,
tooltipTemplate: '<%= value %> $',
responsive: true
}"
colours="{
fillColor: 'rgba(47, 132, 71, 0.8)',
strokeColor: 'rgba(47, 132, 71, 0.8)',
highlightFill: 'rgba(47, 132, 71, 0.8)',
highlightStroke: 'rgba(47, 132, 71, 0.8)'
}"
></canvas>
</div>
实际上,选项有效,但颜色无效。难道我做错了什么?