DrawLegendEntry() protected method

Return a centred marker for the given set
protected DrawLegendEntry ( $set, $x, $y, $w, $h )
コード例 #1
0
ファイル: SVGGraphRadarGraph.php プロジェクト: gotcms/gotcms
 /**
  * Return line and marker for legend
  */
 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;
 }
コード例 #2
0
 /**
  * Return line and marker for legend
  */
 public function DrawLegendEntry($x, $y, $w, $h, $entry)
 {
     if (!isset($entry->style['line_style'])) {
         return '';
     }
     $marker = parent::DrawLegendEntry($x, $y, $w, $h, $entry);
     $h1 = $h / 2;
     $y += $h1;
     $line = $entry->style['line_style'];
     $line['d'] = "M{$x} {$y}l{$w} 0";
     $graph_line = $this->Element('path', $line);
     if (!is_null($entry->style['fill_style'])) {
         $fill = $entry->style['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;
 }
コード例 #3
0
 /**
  * Return line and marker for legend
  */
 public function DrawLegendEntry($set, $x, $y, $w, $h)
 {
     if (!isset($this->line_styles[$set])) {
         return '';
     }
     $marker = parent::DrawLegendEntry($set, $x, $y, $w, $h);
     $h1 = $h / 2;
     $y += $h1;
     $line = $this->line_styles[$set];
     $line['d'] = "M{$x} {$y}l{$w} 0";
     $graph_line = $this->Element('path', $line);
     if ($this->ArrayOption($this->fill_under, $set)) {
         $fill = $this->fill_styles[$set];
         $fill['d'] = "M{$x} {$y}l{$w} 0 0 {$h1} -{$w} 0z";
         $graph_line = $this->Element('path', $fill) . $graph_line;
     }
     return $graph_line . $marker;
 }
コード例 #4
0
 /**
  * Return line and marker for legend
  */
 protected function DrawLegendEntry($set, $x, $y, $w, $h)
 {
     if (!array_key_exists($set, $this->line_styles)) {
         return '';
     }
     $marker = parent::DrawLegendEntry($set, $x, $y, $w, $h);
     $h1 = $h / 2;
     $y += $h1;
     $line = $this->line_styles[$set];
     $line['d'] = "M{$x} {$y}l{$w} 0";
     $graph_line = $this->Element('path', $line);
     if ($this->fill_under) {
         $fill = $this->fill_styles[$set];
         $fill['d'] = "M{$x} {$y}l{$w} 0 0 {$h1} -{$w} 0z";
         $graph_line = $this->Element('path', $fill) . $graph_line;
     }
     return $graph_line . $marker;
 }