TeeChartPHP
[ class tree: TeeChartPHP ] [ index: TeeChartPHP ] [ all elements ]

Source for file HorizArea.php

Documentation is available at HorizArea.php

  1. <?php
  2.  
  3. /**
  4. *
  5. * <p>Title: HorizArea class</p>
  6. *
  7. * <p>Description: HorizArea series.</p>
  8. *
  9. *  <p>Example:
  10. *  <pre><font face="Courier" size="4">
  11. *  areaSeries = new com.steema.teechart.styles.HorizArea(myChart.getChart());
  12. *  areaSeries.setStairs(false);
  13. *  areaSeries.getPointer().setVisible(false);
  14. *  areaSeries.fillSampleValues(6);
  15. *  </font></pre></p>
  16. *
  17. *  <p>Copyright (c) 2005-2008 by Steema Software SL. All Rights
  18. *  Reserved.</p>
  19. *
  20. * <p>Company: Steema Software SL</p><br>
  21.  
  22. */
  23.  
  24. class HorizArea extends Area
  25. {
  26.  
  27.     // Interceptors
  28.     function __get$property {
  29.       $method ="get{$property}";
  30.       if method_exists$this$method ) ) {
  31.         return $this->$method();
  32.       }
  33.     }
  34.  
  35.     function __set $property,$value {
  36.       $method ="set{$property}";
  37.       if method_exists$this$method ) ) {
  38.         return $this->$method($value);
  39.       }
  40.     }
  41.  
  42.    public function HorizArea($c null)
  43.    {
  44.       parent::Area($c);
  45.       
  46.       $this->setHorizontal();
  47.       $this->getXValues()->setOrder(ValueListOrder::$NONE);
  48.       $this->getYValues()->setOrder(ValueListOrder::$ASCENDING);
  49.       /* TODO
  50.       $tmpGradientDirection = new GradientDirection();
  51.       $this->getGradient()->setDirection($tmpGradientDirection->HORIZONTAL);
  52.       */
  53.    }
  54.  
  55.    protected function numSampleValues()
  56.    {
  57.       return 10;
  58.    }
  59.  
  60.    protected function drawMark($valueIndex$st$aPosition)
  61.    {
  62.       $difH $aPosition->height 2;
  63.       $difW $this->getMarks()->getCallout()->getLength($this->getMarks()->getCallout()->getDistance();
  64.  
  65.       $aPosition->leftTop->setY($aPosition->arrowTo->getY($difH);
  66.       $aPosition->leftTop->setX($aPosition->leftTop->getX($difW ($aPosition->width 2));
  67.       $aPosition->arrowTo->setX($aPosition->arrowTo->getX($difW);
  68.       $aPosition->arrowFrom->setY($aPosition->arrowTo->getY());
  69.  
  70.       $aPosition->arrowFrom->setX($aPosition->arrowFrom->getX($this->getMarks()->getCallout()->getDistance());
  71.  
  72.       parent::drawMark($valueIndex$st$aPosition);
  73.    }
  74.  
  75.    /**
  76.    * Gets descriptive text.
  77.    *
  78.    * @return String 
  79.    */
  80.    public function getDescription()
  81.    {
  82.       return Language::getString("HorizAreaSeries");
  83.    }
  84. }
  85.  
  86. ?>

Documentation generated on Wed, 16 Jun 2010 12:06:12 +0200 by phpDocumentor 1.4.1