Overlapping Problem With Status History

Hey, i want to show the sensor situation which is 0 or 1 but the problem is the results from a sensor are overlapping.

So when i get a data in 12.50 and 3 minutes later then they are overlapping. How can i fix it?

Thanks