0
HorizontalBarChart를 사용하고 있습니다. 바의 내부 또는 중간에 Label (공급 업체의 이름)을 그립니다. BarDaset에는 setLabel이라는 것이 있지만 작동하지 않습니다.MPAndroidChart 바 안의 레이블
private BarDataSet createLineChart(String storeName, List<String> listofcompanies){
ArrayList<BarEntry> entries= new ArrayList<BarEntry>();
for (int j = 0; j < listofcompanies.size(); j++) {
entries.add(new BarEntry(Float.parseFloat(listofcompanies.get(j)),j));
}
Random rd = new Random();
setComp1 = new BarDataSet(entries,storeName);
setComp1.setColor(Color.argb(255,rd.nextInt(256),rd.nextInt(256),rd.nextInt(256)));
setComp1.setDrawValues(true);
setComp1.setLabel(storeName);
setComp1.setHighlightEnabled(true);
setComp1.setDrawValues(true);
// LineData data =new LineData(labels,dataset);
return setComp1;
}