I am using MPAndroidChart library and my requirement is to show stack value in stack color as given in picture and also not above the bar but left and right for the alternate stack.
I have tried like this way but it didn't work
set.setValueTextColors(colorList);
It's giving one color for one complete bar.
I used a custom renderer to fix the issue
Here is the code
Chart creation
These are important lines in the above code. Here we are setting the our own renderer class for the graph where we pass the required colorList
RENDERER
In the above code we are overriding the necessary methods and iterating through the colorList in a cicular manner. You may have to change the logic of the drawValue() function to suit your requirements.
To know more about how custom renderer works, check this link
Result
EDIT
Add this function to your custom render pick up the proper color even if some of your values are 0 in the stacked graph. This above function is exactly same as the default implementation expect for the following part :