Were you using the charger that came with the phone or a third party or after market charger? If you are using the charger supplied with the phone, take the phone back and get it replaced. If you are using an after market charger, it is possible that it caused the problem. Of course, you can still take it back, but in the future make sure you use the supplied charger or another one designed for the phone.