MPAndroidChart - Legend labels are being cut off

后端 未结 9 1391
自闭症患者
自闭症患者 2020-12-15 17:18

I am using MPAndroidChart library. Anybody has this problem? When I put the labels in BOTTOM position, these are cut.

Thank you

9条回答
  •  忘掉有多难
    2020-12-15 18:01

    Set wrap content support only Legends postion when legend position is BelowChartLeft, BelowChartRight, BelowChartCenter

         Legend legend = pieChart.getLegend();
            legend.setPosition(Legend.LegendPosition.BELOW_CHART_LEFT);
            legend.setWordWrapEnabled(true);
    

    After this set dataset

     pieChart.setData(pieData)
    

    it will work fine

提交回复
热议问题