/**
  * function to build pie chart data
  *   @param pe : pie_engine object
  *   @return array : data array
  */
 function buildData(&$engine)
 {
     require_once 'DataBuilder.class.php';
     $this->bc->field_group = null;
     $db = new DataBuilder($this->chart->getField_base(), null, $this->chart->getGraphicReport()->getAtid(), $this->artifacts);
     $db->generateData();
     $engine->data = $db->data;
     $engine->legend = $db->x_values;
     return $engine->data;
 }
 /**
  * build bar chart data
  *
  * @param Bar_Engine object
  * @return array data array
  */
 function buildData($engine)
 {
     $filed_group = $this->chart->getField_group();
     if (!$this->chart->getField_group()) {
         $this->chart->setField_group(null);
     }
     $db = new DataBuilder($this->chart->getField_base(), $this->chart->getField_group(), $this->chart->getGraphicReport()->getAtid(), $this->artifacts);
     $db->generateData();
     $engine->data = $db->data;
     $engine->legend = $db->x_values;
     $engine->xaxis = $db->y_values;
     if ($this->chart->getField_group() == null) {
         $engine->xaxis = null;
     }
     return $engine->data;
 }