Ganesh
Ganesh

Reputation: 63

Change the color of background horizontal and vertical grid lines

I'm using mp android library for creating a simple barchart. I know that I can change the color of bar data set. But I want to change the background horizontal and vertical grid lines from default color of black to some other color.

Upvotes: 5

Views: 5351

Answers (1)

web dever
web dever

Reputation: 196

"yourAxis.setGridColor();" is what you're after.

Here's a link to the Android Color page; http://developer.android.com/reference/android/graphics/Color.html

I had the most luck with the constant values, but should be able to come up with the color you're after. For example, I was able to change my X-Axis grid lines to CYAN with the following statement: xAxis.setGridColor(-16711681);

Hope this helps!

Upvotes: 9

Related Questions