When you look at this image, be aware that the phone has simply been sitting on a table, not charging. I've no idea why the battery level would show rising when it's not charging....
It's not, actually. It's showing what looks like a very small dendrite (an internal short) around 9:30, that drops the battery voltage until the dendrite burns out, then the voltage rises back to less that it would have been if there had been no dendrite.
Keep watching that graph, every day or so, and if it keeps happening, the battery has to be replaced. It could (if you're lucky) be a one-shot deal and you'll never see it again.