Chartjs-How do I change the bar colors in chart.js barcharts?

1👍

var ctx = document.getElementById("myChart");
var myChart = new Chart(ctx, {
  type: 'bar',
  data: {
    labels: dates,
    datasets: [
      { 
        backgroundColor: ["#0000FF"],
        data: values
      }
    ]
  }
});

Leave a comment