如何在没有背景的GraphView中绘制图表?

abh*_*hek 10 android background android-graphview

如何使graphview背景完全空白,甚至不显示x轴和y轴.在网上找不到任何东西

在此输入图像描述

abh*_*hek 11

I got my solution by adding these lines

mygraphview.getGridLabelRenderer().setGridStyle(GridLabelRenderer.GridStyle.NONE);// It will remove the background grids

 mygraphview.getGridLabelRenderer().setHorizontalLabelsVisible(false);// remove horizontal x labels and line
  mygraphview.getGridLabelRenderer().setVerticalLabelsVisible(false);
// remove vertical labels and lines
Run Code Online (Sandbox Code Playgroud)

  • 此外,您可能必须将背景设置为不可见:mygraphview.setBackgroundColor(Color.TRANSPARENT); (3认同)