Take look at this example:
https://github.com/m5stack/M5StickC/tree/master/examples/Advanced/AXP192/PowerWake
function 'M5.Axp.GetVapsData()' can be used for what you need. When value is above 4.5V it's charging.
function M5.Axp.GetVbatData() will show you battery level.