Labels with a descender (e.g. May) appeared lower than ones without (e.g. Jun).
Text is drawn baseline aligned, not bottom aligned,and so the code was computing the position wrongly.
$label = $this->calculated['x_label'];
$coords = array('x' => $x, 'y' => $y, 'reference' => 'top-center');
$this->update_boundaryBox($label['boundary_box'], $coords);
- $this->print_TTF($label);
+ $this->print_TTF($label);
}
function draw_zero_axis_left() {
} else {
$width = abs($bounds[4]-$bounds[6]);
$height = abs($bounds[7]-$bounds[1]);
- $offsetY = 0;
+ $offsetY = $bounds[1];
$offsetX = 0;
}