【问题标题】:How to update css for doughnut chart with ng2-charts如何使用 ng2-charts 更新圆环图的 css
【发布时间】:2020-12-24 12:40:38
【问题描述】:

我将 ng2-chartschartjs 用于 angular9。
我画了一个圆环图,它会显示如下:

但是,我预计会是这样的:
线的宽度会变小

我该怎么做? 谢谢。

【问题讨论】:

    标签: chart.js ng2-charts


    【解决方案1】:

    我认为您可以添加自定义选项来减小圆环图的宽度:

    所有选项都在这里https://www.chartjs.org/docs/latest/charts/doughnut.html

        public DonutChartOptions: ChartOptions = {
            options: {
                cutoutPercentage: 80
            }
       };
    

    【讨论】:

      猜你喜欢
      • 2022-09-30
      • 2021-11-08
      • 2016-12-28
      • 1970-01-01
      • 2019-01-16
      • 2021-12-08
      • 2020-06-12
      • 2016-11-23
      • 2021-04-25
      相关资源
      最近更新 更多