To fix this bug, please do the following:

(1) Open file 'pChart.class' and go to lines #831, 832. The lines in question are in 'function drawXYScale':
$this->XDivisionCount = $Divisions;
$this->DataCount = $Divisions + 2;

(2) Replace variable $Divisions with $XDivisions. After this correction, you should have:
$this->XDivisionCount = $XDivisions;
$this->DataCount = $XDivisions + 2;

I am delighted with this tool. Thank you Mr Jean-Damien Pogolotti!

Ahmet