Exactly what charger? Please post a link.
You may have run into the Apple vs. everyone else approach to detecting whether the device is attached to a computer USB port or a charger.
In short, the USB standard was not initially designed to charge devices, it was designed to connect devices to computers. The standard calls for computer USB ports to supply 500mAmps (half an amp). That's plenty for keyboards, mice and most computer peripherals. But modern electronic devices can draw far more than that, and potentially damage the USB port on a computer if they try to draw too much current.
So the industry had to figure out a way for devices to tell if they're connected to a PC (in which case they'll only draw 500mA) or an AC charger, in which case they can draw much more. Since AC chargers don't use the two data connectors, the industry approach was for chargers to short the two data connectors. A phone can recognize that the data connections are shorted, and switch to a higher charging current mode.
Apple, of course, ignored this standard industry approach, and selected a different method on which they could get a patent, and charge licensing fees for other companies to use. So a charger designed for iPhones won't short the data connectors, and your phone will think it's connected to a PC.
IF that's your problem, you can work around it by buying a charge-only cable, instead of a charge & sync cable. You can check what kind of cable you have by using it to connect your phone to your PC. If your PC recognizes the phone, and the phone switches to MTP mode, you have a sync cable. If not, you have a charge-only cable.
Unfortunately, a great many aftermarket chargers are designed to be Apple compatible, even if they don't say so.