/**
  * Build the component group
  */
 function awComponentGroup()
 {
     parent::awComponent();
     $this->components = array();
 }
 /**
  * Build the plot
  *
  */
 function awPlot()
 {
     parent::awComponent();
     $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(TICK_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(TICK_OUT);
     $this->yAxis->setNumberByTick('minor', 'major', 3);
     $this->yAxis->label->setFont(new awTuffy(7));
     $this->yAxis->title->setAngle(90);
 }
 /**
  * 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
  */
 function awMathPlot($xMin, $xMax, $yMax, $yMin)
 {
     parent::awComponent();
     $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(TICK_IN);
     $this->xAxis->label->hideValue(0);
     $this->initAxis($this->xAxis);
     $this->yAxis = new awAxis();
     $this->yAxis->setTickStyle(TICK_IN);
     $this->yAxis->label->hideValue(0);
     $this->initAxis($this->yAxis);
 }
 /**
  * Build the plot
  *
  * @param array $values Pie values
  */
 function awPie($values, $colors = PIE_COLORED)
 {
     $this->setValues($values);
     if (is_array($colors)) {
         $this->colors = $colors;
     } else {
         switch ($colors) {
             case PIE_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 PIE_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 PIE_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::awComponent();
     $this->label = new awLabel();
     $this->label->setCallbackFunction('callbackPerCent');
 }