Unable to set color for BarChart in MPAndroidChart
<p>I want to set a specific color for a bar in <code>BarChart</code> from <code>MPAndroidChart</code>. I do everything according to a documentation, but the color isn't changing.
Here's my code:</p>

<pre><code>   barChart = (BarChart) findViewById(R.id.bar_chart);
   List&lt;BarEntry&gt; entries = new ArrayList&lt;BarEntry&gt;();
   entries.add(new BarEntry(1.0f, 10.0f)); //tmp values

   BarDataSet dataSet = new BarDataSet(entries, "bars");
   dataSet.setColor(R.color.red); //color from resourses

   BarData barData = new BarData(dataSet);

   barChart.setData(barData);
   barChart.invalidate(); 
</code></pre>

<p>The funny thing is that before I tried to change the color of the bar, the bar was blue, after I tried to change its color, it became grey (no matter, what color it must be). I don't understand why doesn't the color change.
I also tried to override <code>getColor</code> method in the <code>BarDataSet</code> class, but result is the same -- bar is grey.</p>

<p><a href="https://i.stack.imgur.com/n3EMJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n3EMJ.png" alt="Grey, but not red"></a></p>