• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CRM_Utils_OpenFlashChart类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: buildChart

 /**
  * @param $rows
  */
 public function buildChart(&$rows)
 {
     $graphRows = array();
     $count = 0;
     $current_year = $this->_params['yid_value'];
     $previous_year = $current_year - 1;
     $previous_two_year = $current_year - 2;
     $previous_three_year = $current_year - 3;
     $upto = $current_year - 4;
     $interval[$previous_year] = $previous_year;
     $interval[$previous_two_year] = $previous_two_year;
     $interval[$previous_three_year] = $previous_three_year;
     $interval["upto_{$upto}"] = "Up To {$upto}";
     foreach ($rows as $key => $row) {
         $display["upto_{$upto}"] = CRM_Utils_Array::value("upto_{$upto}", $display) + CRM_Utils_Array::value("civicrm_upto_{$upto}", $row);
         $display[$previous_year] = CRM_Utils_Array::value($previous_year, $display) + CRM_Utils_Array::value($previous_year, $row);
         $display[$previous_two_year] = CRM_Utils_Array::value($previous_two_year, $display) + CRM_Utils_Array::value($previous_two_year, $row);
         $display[$previous_three_year] = CRM_Utils_Array::value($previous_three_year, $display) + CRM_Utils_Array::value($previous_three_year, $row);
     }
     $graphRows['value'] = $display;
     $config = CRM_Core_Config::Singleton();
     $chartInfo = array('legend' => 'Sybunt Report', 'xname' => 'Year', 'yname' => "Amount ({$config->defaultCurrency})");
     if ($this->_params['charts']) {
         // build the chart.
         CRM_Utils_OpenFlashChart::reportChart($graphRows, $this->_params['charts'], $interval, $chartInfo);
         $this->assign('chartType', $this->_params['charts']);
     }
 }
开发者ID:saurabhbatra96,项目名称:civicrm-core,代码行数:31,代码来源:Sybunt.php


示例2: buildChart

 /**
  * Build chart.
  *
  * @param array $rows
  */
 public function buildChart(&$rows)
 {
     $graphRows = array();
     if (!empty($this->_params['charts'])) {
         if (!empty($this->_params['group_bys']['receive_date'])) {
             $contrib = !empty($this->_params['fields']['total_amount']) ? TRUE : FALSE;
             $softContrib = !empty($this->_params['fields']['soft_amount']) ? TRUE : FALSE;
             foreach ($rows as $key => $row) {
                 if ($row['civicrm_contribution_receive_date_subtotal']) {
                     $graphRows['receive_date'][] = $row['civicrm_contribution_receive_date_start'];
                     $graphRows[$this->_interval][] = $row['civicrm_contribution_receive_date_interval'];
                     if ($softContrib && $contrib) {
                         // both contri & soft contri stats are present
                         $graphRows['multiValue'][0][] = $row['civicrm_contribution_total_amount_sum'];
                         $graphRows['multiValue'][1][] = $row['civicrm_contribution_soft_soft_amount_sum'];
                     } elseif ($softContrib) {
                         // only soft contributions
                         $graphRows['multiValue'][0][] = $row['civicrm_contribution_soft_soft_amount_sum'];
                     } else {
                         // only contributions
                         $graphRows['multiValue'][0][] = $row['civicrm_contribution_total_amount_sum'];
                     }
                 }
             }
             if ($softContrib && $contrib) {
                 $graphRows['barKeys'][0] = ts('Contributions');
                 $graphRows['barKeys'][1] = ts('Soft Credits');
                 $graphRows['legend'] = ts('Contributions and Soft Credits');
             } elseif ($softContrib) {
                 $graphRows['legend'] = ts('Soft Credits');
             }
             // build the chart.
             $config = CRM_Core_Config::Singleton();
             $graphRows['xname'] = $this->_interval;
             $graphRows['yname'] = "Amount ({$config->defaultCurrency})";
             CRM_Utils_OpenFlashChart::chart($graphRows, $this->_params['charts'], $this->_interval);
             $this->assign('chartType', $this->_params['charts']);
         }
     }
 }
开发者ID:kcristiano,项目名称:civicrm-core,代码行数:45,代码来源:Summary.php


示例3: 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


示例4: buildChart

 function buildChart(&$rows)
 {
     $graphRows = array();
     $count = 0;
     $display = array();
     $current_year = $this->_params['yid_value'];
     $previous_year = $current_year - 1;
     $interval[$previous_year] = $previous_year;
     $interval['life_time'] = 'Life Time';
     foreach ($rows as $key => $row) {
         $display['life_time'] = CRM_Utils_Array::value('life_time', $display) + $row['civicrm_life_time_total'];
         $display[$previous_year] = CRM_Utils_Array::value($previous_year, $display) + $row[$previous_year];
     }
     $config = CRM_Core_Config::Singleton();
     $graphRows['value'] = $display;
     $chartInfo = array('legend' => ts('Lybunt Report'), 'xname' => ts('Year'), 'yname' => ts('Amount (%1)', array(1 => $config->defaultCurrency)));
     if ($this->_params['charts']) {
         // build chart.
         require_once 'CRM/Utils/OpenFlashChart.php';
         CRM_Utils_OpenFlashChart::reportChart($graphRows, $this->_params['charts'], $interval, $chartInfo);
         $this->assign('chartType', $this->_params['charts']);
     }
 }
开发者ID:bhirsch,项目名称:civicrm,代码行数:23,代码来源:Lybunt.php


示例5: 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


示例6: 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


示例7: 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


示例8: postProcess

 function postProcess()
 {
     $this->_params = $this->controller->exportValues($this->_name);
     if (empty($this->_params) && $this->_force) {
         $this->_params = $this->_formValues;
     }
     $this->_formValues = $this->_params;
     $this->processReportMode();
     $this->select();
     $this->from();
     $this->where();
     $this->groupBy();
     $sql = "{$this->_select} {$this->_from} {$this->_where} {$this->_groupBy}";
     $dao = CRM_Core_DAO::executeQuery($sql);
     $rows = $graphRows = array();
     $count = 0;
     while ($dao->fetch()) {
         $row = array();
         foreach ($this->_columnHeaders as $key => $value) {
             $row[$key] = $dao->{$key};
         }
         if (!empty($this->_params['charts']) && $row['civicrm_contribution_receive_date_subtotal']) {
             $graphRows['receive_date'][] = $row['civicrm_contribution_receive_date_start'];
             $graphRows[$this->_interval][] = $row['civicrm_contribution_receive_date_interval'];
             $graphRows['value'][] = $row['civicrm_contribution_total_amount_sum'];
             $count++;
         }
         $rows[] = $row;
     }
     $this->formatDisplay($rows);
     $this->assign_by_ref('columnHeaders', $this->_columnHeaders);
     $this->assign_by_ref('rows', $rows);
     $this->assign('statistics', $this->statistics($rows));
     if (!empty($this->_params['charts'])) {
         foreach (array('receive_date', $this->_interval, 'value') as $ignore) {
             unset($graphRows[$ignore][$count - 1]);
         }
         // build chart.
         CRM_Utils_OpenFlashChart::chart($graphRows, $this->_params['charts'], $this->_interval);
     }
     parent::endPostProcess();
 }
开发者ID:archcidburnziso,项目名称:civicrm-core,代码行数:42,代码来源:Summary.php


示例9: 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


示例10: buildChart

 function buildChart(&$rows)
 {
     $graphRows = array();
     $count = 0;
     if (CRM_Utils_Array::value('charts', $this->_params)) {
         foreach ($rows as $key => $row) {
             if ($row['civicrm_contribution_receive_date_subtotal']) {
                 $graphRows['receive_date'][] = $row['civicrm_contribution_receive_date_start'];
                 $graphRows[$this->_interval][] = $row['civicrm_contribution_receive_date_interval'];
                 $graphRows['value'][] = $row['civicrm_contribution_total_amount_sum'];
                 $count++;
             }
         }
         if (CRM_Utils_Array::value('receive_date', $this->_params['group_bys'])) {
             // build the chart.
             $config = CRM_Core_Config::Singleton();
             $graphRows['xname'] = $this->_interval;
             $graphRows['yname'] = "Amount ({$config->defaultCurrency})";
             CRM_Utils_OpenFlashChart::chart($graphRows, $this->_params['charts'], $this->_interval);
             $this->assign('chartType', $this->_params['charts']);
         }
     }
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:23,代码来源:Summary.php


示例11: mulitplePieChart

 function mulitplePieChart(&$rows, $graphData)
 {
     foreach ($rows as $index => $row) {
         $graphData['xlabels'][] = $this->_params['contribution_baseline_interval_value'] . ts(" months to ") . $row['to_date'];
         $graphData['end_date'][] = $row['to_date'];
         foreach ($this->_statuses as $status) {
             $graphData['value'][] = (int) $row[$status];
             $graphData['values'][$index][$status] = (int) $row[$status];
         }
     }
     // build the chart.
     $graphData['xname'] = 'x';
     $config = CRM_Core_Config::Singleton();
     $graphData['yname'] = "Renewals : ";
     $chartInfo = array('legend' => $this->_barChartLegend);
     $chartInfo['xname'] = ts('Base contribution period');
     $chartInfo['yname'] = ts("Number of Donors");
     $chartData = CRM_Utils_OpenFlashChart::reportChart($graphData, 'pieChart', $this->_statuses, $chartInfo);
     $this->assign('chartType', 'pieChart');
     $this->assign('chartsData', $graphData['values']);
     $this->assign('chartsLabels', array('status', 'no. contacts'));
     $this->assign('chartInfo', $chartInfo);
 }
开发者ID:eileenmcnaughton,项目名称:net.ourpowerbase.report.advancedfundraising,代码行数:23,代码来源:ContributionAggregates.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CRM_Utils_PDF_Utils类代码示例发布时间:2022-05-20
下一篇:
PHP CRM_Utils_Money类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap