【发布时间】:2017-08-07 13:26:47
【问题描述】:
我正在使用 import {Chart} from 'chart.js';创建我的聊天,但我有一些挑战。我想创建一个如下所示的图表。
最好的问候
//Creating the doughth
this.doughnutChart = new Chart(this.doughnutCanvas.nativeElement, {
type: 'doughnut',
data: {
labels: ["Cash in Hand", "Cash in Bank", "Cash in Mpesa"],
datasets: [{
label: '# of Votes',
data: [this.naaam, this.naaam1, this.naaam2 ],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
hoverBackgroundColor: [
"#FF6384",
"#36A2EB",
"#FFCE56"
]
}]
}
});
【问题讨论】:
-
"但我有一些挑战"..你能具体说明吗?你是说有什么错误吗?
-
不是错误@suraj 我怎样才能在中间放一些东西,比如 Total:91 和一些可以不断变化的动画。
标签: angular typescript ionic2