Battery has been occasionally draining, even while plugged in.

Phone died and shut off, now when phone plugged in, nothing on screen with battery inserted. When battery is removed a battery outline with a flashing ? appears, but screen goes back to black when the battery is inserted. Is this the phone, charger, or battery?

Phone T-Mobile LG H345 Leon , android 5.1.1 (rooted with TWRP)

edit:if i let it sit for a while it will eventually start charging again