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

Source for file BarStyle.php

Documentation is available at BarStyle.php

  1. <?php
  2.  
  3. /**
  4. *
  5. * <p>Title: BarStyle class</p>
  6. *
  7. * <p>Description: Describes the possible values of the CustomBar setBarStyle
  8. * method</p>
  9. *
  10. * <p>Copyright (c) 2005-2008 by Steema Software SL. All Rights Reserved.</p>
  11. *
  12. * <p>Company: Steema Software SL</p>
  13. *
  14. * <p>Example:
  15. * <pre><font face="Courier" size="4">
  16. * $barSeries = new Bar($myChart->getChart());
  17. * $barSeries->setBarStyle(BarStyle::$CONE);
  18. * $barSeries->getMarks()->setVisible(true);
  19. * $barSeries->getMarks()->setStyle(MarksStyle::$VALUE);
  20. * $barSeries->fillSampleValues(5);
  21. * $barSeries->setConePercent(30);
  22. * </font></pre></p>
  23. *
  24. */
  25.  
  26. class BarStyle
  27. {
  28.    /**
  29.    * Defines a rectangle shape for each bar series point.
  30.    */
  31.    public static $RECTANGLE 0;
  32.  
  33.    /**
  34.    * Defines a pyramid shape for each bar series point.
  35.    */
  36.    public static $PYRAMID 1;
  37.  
  38.    /**
  39.    * Defines an inverted pyramid shape for each bar series point.
  40.    */
  41.    public static $INVPYRAMID 2;
  42.  
  43.    /**
  44.    * Defines a cylinder shape for each bar series point.
  45.    */
  46.    public static $CYLINDER 3;
  47.    /**
  48.    * Defines an ellipse shape for each bar series point.
  49.    */
  50.    public static $ELLIPSE 4;
  51.  
  52.    /**
  53.    * Defines an arrow shape for each bar series point.
  54.    */
  55.    public static $ARROW 5;
  56.  
  57.    /**
  58.    * Defines a cone shape for each bar series point.
  59.    */
  60.    public static $CONE 6;
  61.  
  62.    /**
  63.    * Defines an inverted arrow shape for each bar series point.
  64.    */
  65.    public static $INVARROW 7;
  66.  
  67.    /**
  68.    * Defines an inverted cone shape for each bar series point.
  69.    */
  70.    // TODO public static $INVCONE = 8;
  71.  
  72.    /**
  73.    * Defines a rectangle shape with a gradient for each bar series point.
  74.    */
  75.    // TODO public static $RECTGRADIENT = 9;
  76.    
  77.  
  78.    public function BarStyle()
  79.    {
  80.    }
  81.  
  82.    public function fromValue($value)
  83.    {
  84.       switch ($value)
  85.       {
  86.          case 0:
  87.             return self::$RECTANGLE;
  88.          case 1:
  89.             return self::$PYRAMID;
  90.          case 2:
  91.             return self::$INVPYRAMID;
  92.          case 3:
  93.             return self::$CYLINDER;
  94.          case 4:
  95.             return self::$ELLIPSE;
  96.          case 5:
  97.             return self::$ARROW;
  98.          case 6:
  99.             return self::$RECTGRADIENT;
  100.          case 7:
  101.             return self::$CONE;
  102.          case 8:
  103.             return self::$INVARROW;
  104.          default :
  105.             return self::$RECTANGLE;
  106.       }
  107.    }
  108. }
  109.  
  110. ?>

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