How to make Grid Lines invisible in Android GraphView?

I just want to show only XX axes and labels on those axes and don't want to show grid lines in AndroidGraphView

. How can i do this?

Thanks in advance.

+3


source to share


3 answers


I believe the following call should do the trick:

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

      



Please note that I have not tested the above call :)

+3


source


The following code will remove the grid and then show the X and Y axes



graph.getGridLabelRenderer().setGridStyle(GridLabelRenderer.GridStyle.NONE);
graph.getViewport().setDrawBorder(true);

      

+1


source


If you use this all grid lines will be removed

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

      

To display a horizontal line

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

For the visible vertical line

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

      

+1


source







All Articles