0

I want to create a timeline with bars. It represents different tariff/rates during the day. For example, between 12am and 7am the rate is 10.

How can I implement it using MPAndroidChart?

enter image description here

Yamila
  • 443
  • 1
  • 9
  • 20

1 Answers1

0

You can achieve such grouping with removing space between bars and setting values for all entries(not just to group), they will stick to each other and you will get group with:

data.setBarWidth(1f);

1f is 100% width of bar, and there will not be space between 2 of them:

enter image description here

Barchart bars have always the same width. But you can't make space between you groups.

Misha Akopov
  • 12,241
  • 27
  • 68
  • 82
  • but labels are centered. I need a label at the beginning and a label at the end of each bar – Yamila Jun 01 '18 at 21:55