LineGraph::DrawLegendEntry PHP Method

DrawLegendEntry() protected method

Return line and marker for legend
protected DrawLegendEntry ( $set, $x, $y, $w, $h )
    protected function DrawLegendEntry($set, $x, $y, $w, $h)
    {
        // single line graph only supports one set
        if ($set > 0) {
            return '';
        }
        $marker = parent::DrawLegendEntry($set, $x, $y, $w, $h);
        $h1 = $h / 2;
        $y += $h1;
        $line = $this->line_style;
        $line['d'] = "M{$x} {$y}l{$w} 0";
        $graph_line = $this->Element('path', $line);
        if ($this->fill_under) {
            $fill = $this->fill_style;
            $fill['d'] = "M{$x} {$y}l{$w} 0 0 {$h1} -{$w} 0z";
            $graph_line = $this->Element('path', $fill) . $graph_line;
        }
        return $graph_line . $marker;
    }