How to hide legends and axis in MPAndroidChart?

前端 未结 7 666
栀梦
栀梦 2020-12-13 11:54

Is their any possibility to hide all rounded items from this picture.

\"enter

相关标签:
7条回答
  • 2020-12-13 12:57

    As per this answer

    mChart.getXAxis().setDrawLabels(false); will hide the entire X-Axis(as required for this question).

    For positioning the X-Axis, following code works.

        XAxis xAxis = mChart.getXAxis();
        xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);
    

    Position can be set to

    • BOTTOM
    • BOTH_SIDED
    • BOTTOM_INSIDE
    • TOP
    • TOP_INSIDE

    This helps if you are trying to hide only the particular side axis instead of hiding the entire axis.

    0 讨论(0)
提交回复
热议问题