Kibana essql query date diff

The X axes has the date list not ordered and the calculation of the difference in hours is wrong

Any hint?