Showing line graph based on swipe-in and swipe-out data
I have swipe in time and swipe out time of employees. For example, Employee 1 swipes at 9am and swipes out at 5pm and Employee 2 swipes in at 8am and swipes out at 6pm. I have to create a line/bar graph which will show the no. of persons present in the building over a 24 hours period. So my graph should show 0 till 8am and then 1 person till 9 am and 2 persons after that. This will continue till 5pm where it will go down to 1 person and after 6pm it will become zero.
If a person swipes at 9:26am, then from that moment, it will start showing that person in the graph. Please help.