Minor cleanup of the DrawBatteryGraph() function