I see you also already asked in what JPGraph suggests as the community forum - see
https://groups.google.com/g/jpgraph/c/KY95d1_6OSs
You got no answers there. I second mikrom, you would just need to drop the zeros from the values (see the URL of your request), but maybe your requirement is to have the x axis extend that far and just stop plotting before the x axis ends. If that's the case, posting that requirement would help people come up with an answer, nobody can read minds, still, today.
Otherwise I guess you get no answer, because it's so blatantly obvious you just drop the zeros and nobody wants to invoke the elephant in the room.
All in all, your question surely is better suited in the JPGraph Google group, even though you still got no responses there and now 2 here, but PHP programming doesn't mean using any PHP tool and knowing it in and out or digging into documentation for someone, who does not or cannot.
I'm sure if you become more specific about your requirements, you'll also get an answer from the JPGraph users (and developers, I guess) community or they could add that feature of incomplete graphing.