1 回答

TA貢獻1744條經(jīng)驗 獲得超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
},
}
});
添加回答
舉報