Chartjs-How to set the color of all points in a line graph to the same in chart.js?

2👍

That’s because you use an array. In an array you define each color of the chart. First array element is first chart point, second array element is second chart point… You just define the color of the first element.

If you write borderColor: 'rgb(51, 153, 255)' the color is applied to every point.

Leave a comment