3 * Handles the visualization of Data Point objects.
8 require_once 'pma_svg_data_element.php';
10 class PMA_SVG_Data_Point
extends PMA_SVG_Data_Element
13 * X-Coordinate of the point
18 * Y-Coordinate of the point
23 * A private constructor; prevents direct creation of object.
25 public function __construct($cx, $cy, $label, $dataRow)
27 parent
::__construct($label,$dataRow);
33 public function prepareRowAsSVG($options)
35 return $this->prepareSvg($options);
39 * Prepares and returns the code related to a row in the query result as SVG.
41 * @param array $options Array containing options related to properties of the point
43 * @return the code related to a row in the query result.
46 protected function prepareSvg($options)
48 $point_options = array(
49 'name' => $this->label
. '_' .$options['id'],
50 'id' => $this->label
. 'id' . '_' . $options['id'],
53 'stroke' => $options['color'],
57 $row = '<circle cx="' . $this->cx
. '" cy="' . $this->cy
. '" r=".1"';
58 foreach ($point_options as $option => $val) {
59 $row .= ' ' . $option . '="' . trim($val) . '"';
66 public function getCx()
71 public function setCx($cx)
76 public function getCy()
81 public function setCy($cy)