chart sort by date fix