Losing precision of time value fetched from mongoDB for Time Series graph

I have data for every millisecond stored in MongoDB. The date field is in MongoDB Date format and when plugged into Grafana it is losing millisecond precision.
I tried converting Date() to integer format and still facing the same problem.
Can anyone help me with setting the precision value for time axis for Time Series graph?

To frame it differently: I have more than one value for a parameter within an interval of one second, and I don’t want to lose the information between that interval.
Since Grafana is rounding it off to one second, there are multiple values for a single timestamp, and it may be taking average or doing some calculation.

Direct value from database:

When converted to UNIX epoch time stamp:

The graph looks like this:

EDIT: Issue Resolved

It turns out that the data should be sorted according to time. .sort(‘’: 1) need to be added at the end of the query.