-
-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text Color for X-axis lables #319
Comments
Closing this issue. There is a way to set text color for XLables using following code : |
@rutvijkumarshah I'm not finding Is this on an older version? |
@surfer190 , yeah its with old version, I filed the issue one year ago. |
@rutvijkumarshah It isn't working. then how to set color for x-axis Labels for Pie-Chart ? |
Try it. Chart.getXAxis().setTextColor(Color.Blue); OR XAxis xLabels = Chart.getXAxis(); |
getXAxis() - deprecated, and throws RuntimeException("PieChart has no XAxis"). What is the new way to change x-axis text color? |
if you want to change the text color of lables mChart.setEntryLabelColor(Color.BLUE); or if you want to change value color try it.. PieData data = new PieData(dataSet); i hope it works.. |
Thanks! It helped me, and saved a lot of time. |
legend will do |
|
I have this issue now on a linechart, the text color of my x-labels changes to a dark purple but will not change to any other color. |
I know its a late reply but surely it will help others as it is common mistake ContextCompat.getColor(context, R.color.red_color) The mistake is that you are providing the id of color ( by giving only R.color.some_color) not the actual color |
@PhilJay Thanks for this awesome library.
I could not find a way to change color of x-axis lables. I was able to change text color of y axis values using
mChart.setValueTextColor(getResources().getColor(android.R.color.white));
But this changes text color of only y-axis values in Bar Chart.
The text was updated successfully, but these errors were encountered: