Sorry
This sounds exactly what happened to my chameleon, the sad thing is how long they fight to live. What type of substrate do you use, it might have been a bowl obstruction.
Mine
My chameleon also used to do this, so I bought a plant, chameleon safe, that was strong enough to support his weight, and put it by the window. Now he will sit and look out the window for hours. He seems happy with his plant.
Same
When my female veiled chameleon was about a year old, she also did not eat. It could be that yours is egg bound, even if she has not been in contact with a male. Also, what substraite are you using, because she might have eaten a piece and it is now blocked.