Example #1
0
 /**
  * Get pie chart json for category-pie chart
  * 
  * @return string
  */
 protected function getCategoryPieJson()
 {
     $stats = $this->getModel()->getCategoryPieStats();
     $series = array();
     $trTable = Category_DBTable::DB_TABLE_NAME;
     foreach ($stats as $key => $value) {
         $series[] = array($this->translationMap[$trTable][$value['category']], (int) $value['count']);
     }
     $config = array('main_title' => self::CATEGORY_PIE_PLOT, 'series_name' => 'Contribution');
     return $this->chartHelper->getPieChartJson($config, $series);
 }