Could be bad battery, bad power supply or bad conenction.
Did you check all the power supply connections (outlet, cord to power brick, cord to computer)?
If that is good then take a multimeter, set to DC 20V, test the inside of the power cord (computer end) with red lead and the outside with black lead.
If it is not showing the power it should (outside of power brick should state what its output volts are), then the issue is the power adapter.