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

Source for file LegendTextStyle.php

Documentation is available at LegendTextStyle.php

  1. <?php
  2.  
  3. /**
  4.  * LegendTextStyle class
  5.  *
  6.  * Description: Describes the possible values of the Legend.TextStyle
  7.  *
  8.  * @author
  9.  * @copyright (c) 1995-2008 by Steema Software SL. All Rights Reserved. <info@steema.com>
  10.  * @version 1.0
  11.  * @package TeeChartPHP
  12.  * @subpackage legend
  13.  * @link http://www.steema.com
  14.  */
  15.  
  16. {
  17.  
  18.    /**
  19.    * Legend Text is defined as the series point labels.
  20.    */
  21.    public static $PLAIN 0;
  22.    /**
  23.    * Legend Text is defined as the series values on the left of the series
  24.    * point labels.
  25.    */
  26.    public static $LEFTVALUE 1;
  27.    /**
  28.    * Legend Text is defined as the series values on the right of the series
  29.    * point labels.
  30.    */
  31.    public static $RIGHTVALUE 2;
  32.    /**
  33.    * Legend Text is defined as the series values as a percentage of the total
  34.    * of series values on the left of the series point labels.
  35.    */
  36.    public static $LEFTPERCENT 3;
  37.    /**
  38.    * Legend Text is defined as the series values as a percentage of the total
  39.    * of series values on the right of the series point labels.
  40.    */
  41.    public static $RIGHTPERCENT 4;
  42.    /**
  43.    * Legend Text is defined as the xvalues of the series.
  44.    */
  45.    public static $XVALUE 5;
  46.    /**
  47.    * Legend Text is defined as the series value.
  48.    */
  49.    public static $VALUE 6;
  50.    /**
  51.    * Legend Text is defined as the series values as a percentage of the total
  52.    * of series values
  53.    */
  54.    public static $PERCENT 7;
  55.    /**
  56.    * Legend Text is defined as xvalues of the series and the series values.
  57.    */
  58.    public static $XANDVALUE 8;
  59.    /**
  60.    * Legend Text is defined as xvalues of the series and the series values as
  61.    * a percentage of the total of series values.
  62.    */
  63.    public static $XANDPERCENT 9;
  64.  
  65.  
  66.    public function LegendTextStyle()   {}
  67.  
  68.    public function fromValue($value)
  69.    {
  70.       switch($value)
  71.       {
  72.          case 0:
  73.             return self::$PLAIN;
  74.          case 1:
  75.             return self::$LEFTVALUE;
  76.          case 2:
  77.             return self::$RIGHTVALUE;
  78.          case 3:
  79.             return self::$LEFTPERCENT;
  80.          case 4:
  81.             return self::$RIGHTPERCENT;
  82.          case 5:
  83.             return self::$XVALUE;
  84.          case 6:
  85.             return self::$VALUE;
  86.          case 7:
  87.             return self::$PERCENT;
  88.          case 8:
  89.             return self::$XANDVALUE;
  90.          case 9:
  91.             return self::$XANDPERCENT;
  92.          default:
  93.             return self::$LEFTVALUE;
  94.       }
  95.    }
  96. }
  97. ?>

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