当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_Utils_OpenFlashChart::buildChart方法代码示例

本文整理汇总了PHP中CRM_Utils_OpenFlashChart::buildChart方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Utils_OpenFlashChart::buildChart方法的具体用法?PHP CRM_Utils_OpenFlashChart::buildChart怎么用?PHP CRM_Utils_OpenFlashChart::buildChart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRM_Utils_OpenFlashChart的用法示例。


在下文中一共展示了CRM_Utils_OpenFlashChart::buildChart方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: buildChart

 function buildChart(&$rows)
 {
     $this->_interval = 'events';
     $countEvent = NULL;
     if (CRM_Utils_Array::value('charts', $this->_params)) {
         foreach ($rows as $key => $value) {
             if ($value['civicrm_event_id']) {
                 $graphRows['totalParticipants'][] = $rows[$key]['civicrm_line_item_participant_count_count'];
                 $graphRows[$this->_interval][] = substr($rows[$key]['civicrm_event_title'], 0, 12) . "..(" . $rows[$key]['civicrm_event_id'] . ") ";
                 $graphRows['value'][] = $rows[$key]['civicrm_line_item_participant_count_count'];
             }
         }
         if ($rows[$key]['civicrm_line_item_participant_count_count'] == 0) {
             $countEvent = count($rows);
         }
         if (!empty($rows) && $countEvent != 1) {
             $chartInfo = array('legend' => 'Participants Summary', 'xname' => 'Event', 'yname' => 'Total Participants');
             if (!empty($graphRows)) {
                 foreach ($graphRows[$this->_interval] as $key => $val) {
                     $graph[$val] = $graphRows['value'][$key];
                 }
                 $chartInfo['values'] = $graph;
                 $chartInfo['tip'] = 'Participants : #val#';
                 $chartInfo['xLabelAngle'] = 20;
                 // build the chart.
                 CRM_Utils_OpenFlashChart::buildChart($chartInfo, $this->_params['charts']);
             }
         }
     }
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:30,代码来源:IncomeCountSummary.php

示例2: buildChart

 /**
  * @param $rows
  */
 public function buildChart(&$rows)
 {
     if (empty($rows)) {
         return;
     }
     $chartInfo = array('legend' => ts('Mail Bounce Report'), 'xname' => ts('Mailing'), 'yname' => ts('Bounce'), 'xLabelAngle' => 20, 'tip' => ts('Mail Bounce: %1', array(1 => '#val#')));
     foreach ($rows as $row) {
         $chartInfo['values'][$row['civicrm_mailing_mailing_name_alias']] = $row['civicrm_mailing_bounce_count'];
     }
     // build the chart.
     CRM_Utils_OpenFlashChart::buildChart($chartInfo, $this->_params['charts']);
     $this->assign('chartType', $this->_params['charts']);
 }
开发者ID:nielosz,项目名称:civicrm-core,代码行数:16,代码来源:Bounce.php

示例3: buildChart

 /**
  * @param $rows
  */
 public function buildChart(&$rows)
 {
     $this->_interval = 'events';
     $countEvent = NULL;
     if (!empty($this->_params['charts'])) {
         foreach ($rows as $key => $value) {
             $graphRows['totalAmount'][] = $graphRows['value'][] = CRM_Utils_Array::value('totalAmount', $rows[$key]);
             $graphRows[$this->_interval][] = substr($rows[$key]['civicrm_event_title'], 0, 12) . "..(" . $rows[$key]['civicrm_event_id'] . ") ";
         }
         if (CRM_Utils_Array::value('totalAmount', $rows[$key]) == 0) {
             $countEvent = count($rows);
         }
         if (!empty($rows) && $countEvent != 1) {
             $config = CRM_Core_Config::Singleton();
             $chartInfo = array('legend' => 'Event Summary', 'xname' => 'Event', 'yname' => "Total Amount ({$config->defaultCurrency})");
             if (!empty($graphRows)) {
                 foreach ($graphRows[$this->_interval] as $key => $val) {
                     $graph[$val] = $graphRows['value'][$key];
                 }
                 $chartInfo['values'] = $graph;
                 $chartInfo['xLabelAngle'] = 20;
                 // build the chart.
                 CRM_Utils_OpenFlashChart::buildChart($chartInfo, $this->_params['charts']);
                 $this->assign('chartType', $this->_params['charts']);
             }
         }
     }
 }
开发者ID:sdekok,项目名称:civicrm-core,代码行数:31,代码来源:Summary.php

示例4: buildChart

 /**
  * @param $rows
  */
 public function buildChart(&$rows)
 {
     if (empty($rows)) {
         return;
     }
     $criteria = self::getChartCriteria();
     $chartInfo = array('legend' => ts('Mail Summary'), 'xname' => ts('Mailing'), 'yname' => ts('Statistics'), 'xLabelAngle' => 20, 'tip' => array());
     $plotRate = $plotCount = TRUE;
     foreach ($rows as $row) {
         $chartInfo['values'][$row['civicrm_mailing_name']] = array();
         if ($plotCount) {
             foreach ($criteria['count'] as $criteria => $label) {
                 if (isset($row[$criteria])) {
                     $chartInfo['values'][$row['civicrm_mailing_name']][$label] = $row[$criteria];
                     $chartInfo['tip'][$label] = "{$label} #val#";
                     $plotRate = FALSE;
                 } elseif (isset($criteria['count'][$criteria])) {
                     unset($criteria['count'][$criteria]);
                 }
             }
         }
         if ($plotRate) {
             foreach ($criteria['rate'] as $criteria => $label) {
                 if (isset($row[$criteria])) {
                     $chartInfo['values'][$row['civicrm_mailing_name']][$label] = $row[$criteria];
                     $chartInfo['tip'][$label] = "{$label} #val#";
                     $plotCount = FALSE;
                 } elseif (isset($criteria['rate'][$criteria])) {
                     unset($criteria['rate'][$criteria]);
                 }
             }
         }
     }
     if ($plotCount) {
         $criteria = $criteria['count'];
     } else {
         $criteria = $criteria['rate'];
     }
     $chartInfo['criteria'] = array_values($criteria);
     // dynamically set the graph size
     $chartInfo['xSize'] = count($rows) * 125 + count($rows) * count($criteria) * 40;
     // build the chart.
     CRM_Utils_OpenFlashChart::buildChart($chartInfo, $this->_params['charts']);
     $this->assign('chartType', $this->_params['charts']);
 }
开发者ID:nganivet,项目名称:civicrm-core,代码行数:48,代码来源:Summary.php

示例5: buildChart

 function buildChart(&$rows)
 {
     if (empty($rows)) {
         return;
     }
     $chartInfo = array('legend' => ts('Mail Opened Report'), 'xname' => ts('Mailing'), 'yname' => ts('Opened'), 'xLabelAngle' => 20, 'tip' => ts('Mail Opened: %1', array(1 => '#val#')));
     foreach ($rows as $row) {
         $chartInfo['values'][$row['civicrm_mailing_name']] = $row['civicrm_mailing_opened_count'];
     }
     // build the chart.
     require_once 'CRM/Utils/OpenFlashChart.php';
     CRM_Utils_OpenFlashChart::buildChart($chartInfo, $this->_params['charts']);
     $this->assign('chartType', $this->_params['charts']);
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:14,代码来源:Opened.php


注:本文中的CRM_Utils_OpenFlashChart::buildChart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。