X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FOpenFlashChart.php;h=63173bae52e50a2543f916a90a40acfd5b40c2d9;hb=f6d1d432c84df22d11d6a397a50b66939f0e7f43;hp=6d6f87bdad6542818cce3750643d458c675da08b;hpb=49414d6faa37375cef1ea0a156054ddd9cc6ae8d;p=civicrm-core.git diff --git a/CRM/Utils/OpenFlashChart.php b/CRM/Utils/OpenFlashChart.php index 6d6f87bdad..63173bae52 100644 --- a/CRM/Utils/OpenFlashChart.php +++ b/CRM/Utils/OpenFlashChart.php @@ -23,7 +23,7 @@ | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ -*/ + */ /** * @@ -43,12 +43,20 @@ class CRM_Utils_OpenFlashChart { /** * Colours. * @var array - * @static */ private static $_colours = array( - "#C3CC38", "#C8B935", "#CEA632", "#D3932F", - "#D9802C", "#FA6900", "#DC9B57", "#F78F01", - "#5AB56E", "#6F8069", "#C92200", "#EB6C5C", + "#C3CC38", + "#C8B935", + "#CEA632", + "#D3932F", + "#D9802C", + "#FA6900", + "#DC9B57", + "#F78F01", + "#5AB56E", + "#6F8069", + "#C92200", + "#EB6C5C", ); /** @@ -59,7 +67,6 @@ class CRM_Utils_OpenFlashChart { * * @return object * $chart object of open flash chart. - * @static */ public static function &barChart(&$params) { $chart = NULL; @@ -127,7 +134,7 @@ class CRM_Utils_OpenFlashChart { $xLabels = new x_axis_labels(); // set_labels function requires xValues array of string or x_axis_label // so type casting array values to string values - array_walk($xValues, function(&$value, $index) { + array_walk($xValues, function (&$value, $index) { $value = (string) $value; }); $xLabels->set_labels($xValues); @@ -190,7 +197,6 @@ class CRM_Utils_OpenFlashChart { * * @return object * $chart object of open flash chart. - * @static */ public static function &pieChart(&$params) { $chart = NULL; @@ -255,7 +261,6 @@ class CRM_Utils_OpenFlashChart { * * @return object * $chart object of open flash chart. - * @static */ public static function &bar_3dChart(&$params) { $chart = NULL; @@ -447,13 +452,12 @@ class CRM_Utils_OpenFlashChart { foreach ($rows['multiValue'] as $key => $val) { $graph[$key] = array_combine($dateKeys, $rows['multiValue'][$key]); } - $chartData = - array( - 'legend' => "$legend " . CRM_Utils_Array::value('legend', $rows, ts('Contribution')) . ' ' . ts('Summary'), - 'values' => $graph[0], - 'multiValues' => $graph, - 'barKeys' => CRM_Utils_Array::value('barKeys', $rows, array()), - ); + $chartData = array( + 'legend' => "$legend " . CRM_Utils_Array::value('legend', $rows, ts('Contribution')) . ' ' . ts('Summary'), + 'values' => $graph[0], + 'multiValues' => $graph, + 'barKeys' => CRM_Utils_Array::value('barKeys', $rows, array()), + ); } // rotate the x labels. @@ -468,7 +472,10 @@ class CRM_Utils_OpenFlashChart { // carry some chart params if pass. foreach (array( - 'xSize', 'ySize', 'divName') as $f) { + 'xSize', + 'ySize', + 'divName', + ) as $f) { if (!empty($rows[$f])) { $chartData[$f] = $rows[$f]; } @@ -505,7 +512,10 @@ class CRM_Utils_OpenFlashChart { // carry some chart params if pass. foreach (array( - 'xSize', 'ySize', 'divName') as $f) { + 'xSize', + 'ySize', + 'divName', + ) as $f) { if (!empty($rows[$f])) { $chartData[$f] = $rows[$f]; } @@ -558,4 +568,5 @@ class CRM_Utils_OpenFlashChart { return $openFlashChart; } + }