如何在任何图表中减小边框宽度?

时间:2019-05-09 13:20:43

标签: chart.js ng2-charts

我正在与ng2-charts一起绘制折线图。我想减小线的粗细(减小边框宽度)。我尝试了borderWidthlineThickness属性。但是似乎没有任何作用。还有其他选择还是我犯错了?

请查看代码

Demo code

1 个答案:

答案 0 :(得分:1)

您在提供的演示中将borderWidth拼写为borederWidth。将其修复在chartData上可以得到所需的结果。

...
chartData = [
  {
    ...
    borderWidth: 1, // <-- fix the spelling here
    ...
  },
  ...
];
...

修复后,将显示以下外观:

Fixed look