/** * Overload to return the firection of the pie centre */ public function DataLabelTailDirection($dataset, $index, $hpos, $vpos) { if (isset($this->slice_info[$index])) { $a = rad2deg($this->slice_info[$index]->MidAngle()); // tail direction is opposite slice direction if ($this->reverse) { return (900 - $this->start_angle - $a) % 360; } else { return (180 + $this->start_angle + $a) % 360; } } // fall back to default return parent::DataLabelTailDirection($dataset, $index, $hpos, $vpos); }