0
HorizontalBarChartを使用しています。Barの内側または中央にLabel(製造元の名前)を描画したいのですが、BarDasetにはsetLabelというものがありますが、動作しません。ここ は私のコードです:MPAndroidChart Bar内のラベル
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;
}