I think I found the issue.
function _doLabelFormat($aVal,$aIdx,$aNbrTicks) {
// If precision hasn't been specified set it to a sensible value
if( $this->precision==-1 ) {
$t = log10($this->minor_step);
if( $t >= 0 ) { //this was $t > 0
$precision = 0;
}
else {
$precision = -floor($t);
}
}
else {
$precision = $this->precision;
}