Reputation: 772
I have an horizontal bar chart i need to make the height of every line thinner, so i need to change the height of BarDataSet
this is my bar chart code:
BarDataSet dataset = new BarDataSet(entries, "");
ArrayList<String> array = new ArrayList<String>();
for (int i = 0; i < poll.getQuestions().get(0).getAnswers().size(); i++)
array.add(poll.getQuestions().get(0).getAnswers().get(i).getAnswer());
BarData data = new BarData(array, dataset);
dataset.setColor(ContextCompat.getColor(PollDetailActivity.this,R.color.green)); //
dataset.setBarSpacePercent(5f);
pieChart.setDescription("");
pieChart.getAxisLeft().setDrawGridLines(false);
pieChart.getXAxis().setDrawGridLines(false);
// pieChart.getAx().setDrawLabels(false);
pieChart.setData(data);
pieChart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);
// pieChart.getXAxis().setEnabled(false);
pieChart.getAxisRight().setEnabled(false);
pieChart.animateY(5000);
This image show that the line is so wide
so how i can make the lines thinner ?
Upvotes: 1
Views: 818