根据Chart.js的文档,要从工具提示中移除 colored颜色 框,只需将displayColors: false
添加到tooltip
,这也是对此处类似问题的公认答案How to remove square label from tooltip and make its information in one line?
但它在我的代码中不起作用.这是到编辑https://stackblitz.com/edit/stackblitz-starters-ntdk3g?file=src%2FApp.js的链接