我正在使用chart.js的doghnut。我想在doghnut的片段上显示图标,如下图所示
我为标签添加了以下代码,但仅对文本添加了
plugins: {
datalabels: {
color: '#111',
textAlign: 'center',
font: {
lineHeight: 1.6
},
formatter: function(value, ctx) {
return '<p>My Paragrpah</p>\ndf';
}
}
}
图标显示在Doghnut的象限上。任何帮助表示赞赏。