MPAndroidChartLibrary를 사용하고 있으며 범례를 표시 할 때 문제가 발생합니다.
Aug 21 2020
MPANdroidChartLibrary를 사용 하고 있지만 차트 하단에 세로 범례를 표시 할 때 문제가 있습니다. 마지막 전설이 끊어졌습니다.
첨부 된 이미지 참조 :

작은 장치에서 AM 등록 후 마지막 범례가 잘립니다. 나는 Answer1을 따른다
3 : 하단 중앙에 MpAndroidChart pieChart에 전설 절단 문제 와 ANSWER2의 스택 오버 플로우하지만 아무것도에 대한 게시물이 나를 위해 작동합니다.
놀랍게도이 문제는 차트 주변의 스크롤보기를 사용한 후에도 작은 장치에서만 발생하며 6 인치 이상의 대형 장치에서는 모든 범례가 제대로 표시됩니다.
답변
4 AbdurRehman Aug 26 2020 at 16:46
범례가 커지면 오프셋을 추가하십시오.
차트의 상단과 하단에 지정된 패딩을 추가하는 두 가지 방법이 있습니다.
mPiecPieChart.setExtraBottomOffset(12f);//from bottom side if legends are bottom side mPiecPieChart.setExtraTopOffset(12f);//if legends are on top side or change both if legend are on both sides
이 코드 줄로 줄 아래와 마지막 항목 범례 사이에 여백을 설정할 수 있습니다!
legend.setYOffset(50f);
범례가 증가하면 값을 높일 수 있고 범례 항목을 줄이면이 값도 줄일 수 있습니다!
Legend legend = chart.getLegend(); legend.setVerticalAlignment(Legend.LegendVerticalAlignment.BOTTOM); legend.setHorizontalAlignment(Legend.LegendHorizontalAlignment.CENTER); legend.setOrientation(Legend.LegendOrientation.VERTICAL); legend.setDrawInside(false); legend.setYOffset(50f);//here value changes