fix y axis labels overlapping each other

Fixes y axis labels overlapping by setting the number of labels that should appear. When the labels are for a day or more, the entire date should be shown, so there is room for less labels.