Ordering data in charts

How can I specify the sort order for a chart. I have data based on date, but I don’t want the time showing on the axis legend so I made a text formula with the date formatted correctly. The problem is that the data is now sorted according to the text and I end up with data looking like:

image

Any ideas how to keep the sort by date. I tried applying a sort to the data in the chart setup but this makes no difference.

Many thanks