【问题标题】:How to add prefix to legend in ng charts using angular如何使用角度在 ng 图表中为图例添加前缀
【发布时间】:2021-04-11 02:11:27
【问题描述】:

我在图例之前使用 ng2 图表创建了圆环图,我需要在图例中添加前缀标签

https://stackblitz.com/edit/ng2-charts-demo-example

screenshot here

需要这样

like this

【问题讨论】:

    标签: javascript angular charts chart.js ng2-charts


    【解决方案1】:

    它没有默认选项,实现这一点的唯一方法是编写一个自定义插件,为您将文本放在画布上。 https://www.chartjs.org/docs/latest/developers/plugins.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-06-05
      • 2013-07-05
      • 1970-01-01
      • 2011-04-29
      • 1970-01-01
      • 2018-04-30
      • 2021-11-03
      相关资源
      最近更新 更多