/** * Write the X Axis caption on the scale, if set */ private function writeScaleXAxisCaption(pData $data, ScaleStyle $style, $YMax) { if ($data->getDataDescription()->getXAxisName() != '') { $Position = imageftbbox($this->FontSize, 90, $this->FontName, $data->getDataDescription()->getXAxisName()); $TextWidth = abs($Position[2]) + abs($Position[0]); $TextLeft = ($this->GArea_X2 - $this->GArea_X1) / 2 + $this->GArea_X1 + $TextWidth / 2; $this->canvas->drawText($this->FontSize, 0, new Point($TextLeft, $YMax + $this->FontSize + 5), $style->getColor(), $this->FontName, $data->getDataDescription()->getXAxisName(), $this->shadowProperties); } }