【发布时间】:2018-09-08 09:32:00
【问题描述】:
我使用 angular 6 并且有一个垂直条形图。我想让酒吧的角落变圆!我该怎么做?
这里是部分代码:
.ts
ngAfterViewInit() {
this.canvas = document.getElementById('barChart');
this.ctx = this.canvas.getContext('2d');
let myChart = new Chart(this.ctx, {
type: 'bar',
data: {
labels: this.my_labels,
datasets: [
{
label: '',
fill: false,
backgroundColor: [
'#2699fb',
'#2699fb',
'#2699fb',
],
borderWidth: 1,
data: [12000, 18000, 65000],
}
]
},
options: {
responsive: false,
legend: {
display: false
}
}
});
}
【问题讨论】:
-
@Ray 不,我试过了,但它无法识别 chart.types 或 chart.elements
标签: javascript typescript chart.js bar-chart angular6