Problem:
MPAndroidChart calculates grid and label position nicely for decimal values but not so for a date/time axis.
I would like to have label positions justified to exactly midnight eg. with a x-axis range of 4 days on:
[26.1-00h, 27.1-00h, 28.1-00h,29.1-00h, 30.1-00h]
Or if the range is eg. only 2 days:
[26.1-00h, 26.1-12h, 27.1-00h, 27.1-12h,28.1-00h]
etc.
What I tried:
Adapting the solution of MPAndroidChart x-axis date/time label formatting but it didn't work for recent release 3.1.0 of MPAndroidChart.
Correcting the Chart min and max by using setAxisMinimum() and setAxisMaximum() to midnight timestamps.
Playing with different value scaling.
Setting the granularity with setGranularity() to a whole day, but then datapoints snaps away from its original to ganularity positions.
The calculation of the grid origin and spacing seems to be done in computeAxisValues() of class AxisRenderer but this class cant be overloaded (?)
Is there a way to control the positioning of the x-axis labels without changing the library?