If your battery doesn't charge it's getting too little power.
Do be aware that it is possible for your computer to use more power than the charger can provide, so if you are maxing it out while plugged in the battery can still deplete, this only seems to happen in highly intensively games as far as I have seen but it could happen with other processes.