Dataloading issue

I have historical data, which I am loading via a script into the database. The data is inserted correctly, and when looked at by the gui (grafana), all is well. When I then load in realtime data with the same measurements types, I get duplicate measurements when observed in Chronograf, and no data visible in the gui, apart from the realtime values, ie no history.
I have tried to resolve this with and without tags, but no luck.
Can anyone help me with this?