protected function DrawLegendEntry($set, $x, $y, $w, $h) { if (!array_key_exists($set, $this->slice_styles)) { return ''; } $bar = array('x' => $x, 'y' => $y, 'width' => $w, 'height' => $h); return $this->Element('rect', $bar, $this->slice_styles[$set]); }