[Chartjs]-Can't change color line with chart.js

35👍

This is because, you are using deprecated properties (used in ChartJS 1.x) for setting colors. Use the following properties instead (which is applicable for ChartJS 2.7) :

datasets: [{
   label: 'Dique Las Maderas',
   fill: false,
   borderColor: "#bae755",
   borderDash: [5, 5],
   backgroundColor: "#e755ba",
   pointBackgroundColor: "#55bae7",
   pointBorderColor: "#55bae7",
   pointHoverBackgroundColor: "#55bae7",
   pointHoverBorderColor: "#55bae7",
   data: valor
}]

Leave a comment