Error jumping using PID on absolute encoders

So our encoder position jumps from 4000 to 700 or from 0 to 3300. On an error graph, it will decrease and then jump back to its initial error which at that point it works correctly. The issue is that this happenes every time we turn our wheels. Can anyone help?

To help us help you:
-What encoder are you using?
-How are you reading it (through an IO port, CAN bus, etc)?
-Where is the encoder attached (gearbox, wheel, etc)?

We will need more info.
What encoders are you using?
What programming language are you using?
To what the encoder is wired? Talon or roborio?
What graph exactly?

Nevermind, we managed to fix the issue. It was something with the pidget(); and ranges not matching.