1 回答
TA贡献1744条经验 获得超4个赞
试试这个,这里为标签添加了位置,来自图表 js,图例标签文档
var myChart = new Chart(ctx, {
type: 'pie',
data: {
labels: ['한국', '일본'],
datasets: [{
label: '# of Votes',
data: [{
!!$koreaSenderCount!!
},
{
!!$japanSenderCount!!
}
],
backgroundColor: [
'red',
'blue',
],
}]
},
options: {
maintainAspectRatio: false,
legend: {
position:'right', // from this line you can get your labels in right direction
},
}
});
添加回答
举报
