我使用 angular-chart.js 和 chart.js 2.0.2 - 我有条形图。这是我在 index.slim 中的图表代码
canvas#bar.chart.chart-bar chart-data="data" chart-labels="labels" chart-options="options"
如何在我尝试过的 Controller 中设置 beginAtZero 选项(其他选项有效(f.e display: true )):
$scope.options = {
scale: {
ticks: {
beginAtZero: true
}
}
};
我做错了什么?
最佳答案
试试这个:
$scope.options = {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
};
关于javascript - 选项 beginAtZero 在 angular-chart.js 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38104993/