Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 924
Ganesh Avatar asked Feb 08 '23 05:02

Ganesh


1 Answers

"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!

like image 68
web dever Avatar answered Feb 09 '23 19:02

web dever