Fix x-axis-dates problem by changing the data that is passed to the Date constructor