title: MPAndroidChart - all pieces of the pie chart are the same colour
body: <p>I am using MPAndroidChart (<a href="https://github.com/PhilJay/MPAndroidChart" rel="noreferrer">https://github.com/PhilJay/MPAndroidChart</a>) library to generate pie chart. I followed multiple tutorials including the wiki page, but when I create my pie chart all of the pieces are the same color. Any idea how can I solve this ?</p>
  
  <p>Code:</p>
  
  <pre><code>PieChart mChart = (PieChart) findViewById(R.id.piechart);
  
  List&lt;PieEntry&gt; pieChartEntries = new ArrayList&lt;&gt;();
  
  pieChartEntries.add(new PieEntry(18.5f, "Green"));
  pieChartEntries.add(new PieEntry(26.7f, "Yellow"));
  pieChartEntries.add(new PieEntry(24.0f, "Red"));
  pieChartEntries.add(new PieEntry(30.8f, "Blue"));
  
  PieDataSet set = new PieDataSet(pieChartEntries, "Emotion Results");
  PieData data = new PieData(set);
  mChart.setData(data);
  set.setColors(R.color.pieColour1,R.color.pieColour2,R.color.pieColour3,R.color.pieColour4,R.color.pieColour5,R.color.pieColour6,R.color.pieColour7,R.color.pieColour8);
  mChart.invalidate();
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/j1vII.png" rel="noreferrer"><img src="https://i.stack.imgur.com/j1vII.png" alt="enter image description here"></a></p>