Search code examples
chart.jsng2-charts

How to decrease border width in any charts?


I am working with ng2-charts to draw line chart. I want to reduce the thickness of line (decrease border width). I tried both borderWidth and lineThickness properties. But nothing seems to be working. Is there any other option or am I making any mistake ?

Please have a look at the code

Demo code


Solution

  • You have misspelled borderWidth as borederWidth in your demo provided. Fixing that on your chartData gives you the desired result.

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

    Fixing this will give the following look:

    Fixed look