예제 #1
0
 /**
  * Create the plotarea, implicitely creates 2 normal axis
  */
 function __construct()
 {
     parent::__construct();
     $this->_padding = array('left' => 10, 'top' => 10, 'right' => 10, 'bottom' => 10);
     $this->_axisX =& Image_Graph::factory('Image_Graph_Axis_Radar');
     $this->_axisX->_setParent($this);
     $this->_axisY =& Image_Graph::factory('Image_Graph_Axis', IMAGE_GRAPH_AXIS_Y);
     $this->_axisY->_setParent($this);
     $this->_axisY->_setMinimum(0);
 }
예제 #2
0
 /**
  * PlotareaMap [Constructor]
  *
  * @param string $map The name of the map, i.e. the [name].png and  [name].
  *   txt files located in the Images/maps folder
  */
 function Image_Graph_Plotarea_Map($map)
 {
     parent::__construct();
     $this->_imageMap = dirname(__FILE__) . "/../Images/Maps/{$map}.png";
     $points = file(dirname(__FILE__) . "/../Images/Maps/{$map}.txt");
     list($width, $height) = getimagesize($this->_imageMap);
     $this->_mapSize['X'] = $width;
     $this->_mapSize['Y'] = $height;
     if (is_array($points)) {
         unset($this->_mapPoints);
         foreach ($points as $line) {
             list($country, $x, $y) = explode("\t", $line);
             $this->_mapPoints[$country] = array('X' => $x, 'Y' => $y);
         }
     }
 }