Skip to content
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

Can't change X-axis label color #387

Closed
avishaan opened this issue Sep 18, 2015 · 9 comments
Closed

Can't change X-axis label color #387

avishaan opened this issue Sep 18, 2015 · 9 comments

Comments

@avishaan
Copy link
Contributor

I'm trying to change the x-axis label but am unable to do it. Any idea if this is implemented? It's the same thing he is trying to do here. PhilJay/MPAndroidChart#319

@avishaan
Copy link
Contributor Author

I'm an idiot, nvm. It was approximately xAxis.labelTextColor = UIColor.whiteColor()

@avishaan
Copy link
Contributor Author

Actually, i'm not an idiot. It was pretty different from the Android docs such that it took me a few minutes to figure out.
Android:

XLabels label = chart.getXLabels();
label.setTextColor(getResources().getColor(android.R.color.white));

iOS:

var xAxis = chartView.xAxis
xAxis.labelTextColor = UIColor.whiteColor()

@danielgindi
Copy link
Collaborator

The android docs are not up to date... there's no getXLabels function in the android library anymore!

@avishaan
Copy link
Contributor Author

ahh, ic ic

@JoeSerb
Copy link

JoeSerb commented Jun 25, 2016

Hi,
I'm trying to change color of y-axis label, but I can't find method for this. Is it possible to change color of y axis label?
Thank you for your framework and for your help!!!!

@JoeSerb
Copy link

JoeSerb commented Jul 3, 2016

I found solution:
self.graphTwo.leftAxis.labelTextColor = UIColor.whiteColor()
self.graphTwo.rightAxis.labelTextColor = UIColor.whiteColor()
Thank you....

@anishparajuli555
Copy link

@danielgindi @codehatcher Is there a way to change the background color instead of text color?

@amish-infosys
Copy link

What if I want to change text color of specific labels on y axis/x axis ? Is there any way ?

Thanks

@t0nyak
Copy link

t0nyak commented Sep 18, 2018

I've also the same problem as @amish-infosys. I need to color/bold label of concrete x axis when its value is tapped. However, I just find the way of setting color for every label of x axis, not just for one.

Any idea on this?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants