I need to define specific hex values for each slice in my pie chart.
I\'m following the wiki but the method doesn\'t seem to be working for PieDataSet>
use ContextCompat.getColor(context, R.color.green1) instead of R.color.green1 if not colors will not shown properly.
example code in Kotlin :
val colorFirst = context?.let { ContextCompat.getColor(it, R.color.colorFirst) }
val colorSecond = context?.let { ContextCompat.getColor(it, R.color.colorSecond) }
val colorThird = context?.let { ContextCompat.getColor(it, R.color.colorThird) }
pieDataSet.colors = mutableListOf(colorFirst, colorSecond, colorThird)