Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Grid Lines invisible in Android GraphView?

I just want to show only X Y axes and labels on these axes and don't want to show grid lines in Android GraphView. How can I do that?

Thanks in advance.

like image 250
Red Devil Avatar asked Jul 07 '15 05:07

Red Devil


2 Answers

I believe the following call should do the trick :

your_graph.getGridLabelRenderer().setGridStyle( GridLabelRenderer.GridStyle.NONE );

Please do note I haven't tested the above call :)

like image 143
Cyril C. Avatar answered Oct 20 '22 00:10

Cyril C.


If you use this all the grid lines will be Removed

your_graph.getGridLabelRenderer().setGridStyle( GridLabelRenderer.GridStyle.NONE );

For Setting Horizontal Line visible

your_graph.getGridLabelRenderer().setGridStyle(GridLabelRenderer.GridStyle.HORIZONTAL);

For Vertical Line visible

your_graph.getGridLabelRenderer().setGridStyle( GridLabelRenderer.GridStyle.VERTICAL);
like image 4
Christos Themelis Avatar answered Oct 20 '22 02:10

Christos Themelis