Implementing power panel in Usage

The power panel in gnome-usage intends to inform users about how different applications and hardware components are consuming power in their systems. For instance, how much does the screen affect overall power consumption, and how much impact on battery life can be ascertained by lowering the screen brightness by as little as 10%.

In the first phase of the project, I focused on implementing the front end components in Usage in Vala. This was a lot of fun, and taught me many interesting things about object oriented programming. One of the problems faced initially was regarding how to switch data for the graph and changing graph rendering capabilities for accommodating very large datasets such as Battery levels over 5 days.
Another problem was how to fetch the Battery data inside Usage from UPower over DBus, and how to handle the data in Rg.Table for large time values, averaging and extrapolating missing values as well!