コード例 #1
0
 /**
  * Build the component group
  */
 public function __construct()
 {
     parent::__construct();
     $this->components = array();
 }
コード例 #2
0
ファイル: Plot.class.php プロジェクト: greench/prestashop
 /**
  * Build the plot
  *
  */
 public function __construct()
 {
     parent::__construct();
     $this->grid = new awGrid();
     $this->grid->setBackgroundColor(new awWhite());
     $this->padding->add(20, 0, 0, 20);
     $this->xAxis = new awAxis();
     $this->xAxis->addTick('major', new awTick(0, 5));
     $this->xAxis->addTick('minor', new awTick(0, 3));
     $this->xAxis->setTickStyle(awTick::OUT);
     $this->xAxis->label->setFont(new awTuffy(7));
     $this->yAxis = new awAxis();
     $this->yAxis->auto(TRUE);
     $this->yAxis->addTick('major', new awTick(0, 5));
     $this->yAxis->addTick('minor', new awTick(0, 3));
     $this->yAxis->setTickStyle(awTick::OUT);
     $this->yAxis->setNumberByTick('minor', 'major', 3);
     $this->yAxis->label->setFont(new awTuffy(7));
     $this->yAxis->title->setAngle(90);
 }
コード例 #3
0
 /**
  * Build the plot
  *
  * @param array $values Pie values
  */
 public function __construct($values, $colors = awPie::COLORED)
 {
     $this->setValues($values);
     if (is_array($colors)) {
         $this->colors = $colors;
     } else {
         switch ($colors) {
             case awPie::AQUA:
                 $this->colors = array(new awColor(131, 220, 215), new awColor(131, 190, 215), new awColor(131, 160, 215), new awColor(160, 140, 215), new awColor(190, 131, 215), new awColor(220, 131, 215));
                 break;
             case awPie::EARTH:
                 $this->colors = array(new awColor(97, 179, 110), new awColor(130, 179, 97), new awColor(168, 179, 97), new awColor(179, 147, 97), new awColor(179, 108, 97), new awColor(99, 107, 189), new awColor(99, 165, 189));
                 break;
             case awPie::DARK:
                 $this->colors = array(new awColor(140, 100, 170), new awColor(130, 170, 100), new awColor(160, 160, 120), new awColor(150, 110, 140), new awColor(130, 150, 160), new awColor(90, 170, 140));
                 break;
             default:
                 $this->colors = array(new awColor(187, 213, 151), new awColor(223, 177, 151), new awColor(111, 186, 132), new awColor(197, 160, 230), new awColor(165, 169, 63), new awColor(218, 177, 89), new awColor(116, 205, 121), new awColor(200, 201, 78), new awColor(127, 205, 177), new awColor(205, 160, 160), new awColor(190, 190, 190));
                 break;
         }
     }
     parent::__construct();
     $this->label = new awLabel();
     $this->label->setCallbackFunction('callbackPerCent');
 }
コード例 #4
0
 /**
  * Build the plot
  *
  * @param int $xMin Minimum X value
  * @param int $xMax Maximum X value
  * @param int $yMax Maximum Y value
  * @param int $yMin Minimum Y value
  */
 public function __construct($xMin, $xMax, $yMax, $yMin)
 {
     parent::__construct();
     $this->setPadding(8, 8, 8, 8);
     $this->grid = new awGrid();
     // Hide grid by default
     $this->grid->hide(TRUE);
     // Set extremum
     $this->extremum = new awSide($xMin, $xMax, $yMax, $yMin);
     // Create axis
     $this->xAxis = new awAxis();
     $this->xAxis->setTickStyle(awTick::IN);
     $this->xAxis->label->hideValue(0);
     $this->initAxis($this->xAxis);
     $this->yAxis = new awAxis();
     $this->yAxis->setTickStyle(awTick::IN);
     $this->yAxis->label->hideValue(0);
     $this->initAxis($this->yAxis);
 }