title: Configure Pie Chart Colors Using Chart.js and PHP
body: <p>I have been trying to enable different colors for different areas but I cannot find a way of having different colors for different objects.</p>
  
  <p>Am fetching data from database and then working on it and working on it as follows.</p>
  
  <p>I would appreciate your views on how to change colors for different items</p>
  
  <pre><code>//looping through the data
  for(var i in data) {
      CarPrices.push(data[i].name);
      score.push(data[i].price);
  }
  
  //Working with data fetched from database
  var chartdata = {
      labels: player,
      datasets : [
          {
               //Trying to change background color for each element                               
               label: 'Car Prices',
               backgroundColor: [
                    "#FF6384",
                    "#36A2EB",
                    "#FFCE56"
               ],
               //Trying to change background color for each element**
               hoverBackgroundColor: [
                    "#FF6384",
                    "#36A2EB",
                    "#FFCE56"
               ],
  
          }
      ]
  };
  </code></pre>