Analyzing PSQL timeseries visualization issues

Hi, we are using PSQL as a DataSource and no issues with data timestamp. But somehow, while using timeseries visualization using PSQL query with condition like to get last 15 days data, we are getting clumsy graph. But when we changed it to 1 or 5 days, it is showing perfect one. I am attaching the screenshots here. Please check once.

Id recommend adding an ORDER BY the date in your sql - timeseries assumes data will come in order

Id guess it comes in order for the 1-5 days query but doesnt for the larger dataset for some reason