checkBattery: adding a chart of the percentage of battery according to the time. The chart data is saved in html5 local storage if available.