It may actually be charging but then something on the device may be draining it faster than it can charge. If it is charging fine when not being use, and also when turned off, then I would look into what is on the device that is causing the fast drain. Bad app, virus, malware, etc.
Should that not be the case, and it drains fast anytime it is on, then you may want to look into a new battery. Yes, I know batteries on them are harder to replace than they could be, but it can be done. If the device is under warranty, you would need to contact the manufacturer about the battery replacement.