I can tell you if you're measuring power, you can at least make that work from the perspective of current will be greater than zero or at least a standby current, so then you will easily be able to detect your start and end times.
You're still going to have to implement some code to automate what you want to do, but once it's in and running, it will make life a lot easier with what you are trying to achieve I assure you.
Whilst cwangv's idea is a solid starting point, you're still going to want to pull by 24 hour window, then I'd recommend using a slider to add or remove up to twelve hours worth time to be able to overlay the two, the overlay part I can see is where an AngularJS controller will be required to make this work because I do not believe it's as easy to go through and parse and modify the timestamps in the dashboard post API pull.
I'll leave cwangv to find the solution for if it can be realised without a controller, I'd be very impressed and a lot of people will benefit from it. However if some further help is required I'll put my hand up.
Fox