+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
// $params['values'] should contains the values for each
// criteria defined in $params['criteria']
$values = CRM_Utils_Array::value('values', $params);
- $criterias = CRM_Utils_Array::value('criteria', $params);
- if (!is_array($values) || empty($values) || !is_array($criterias) || empty($criterias)) {
+ $criteria = CRM_Utils_Array::value('criteria', $params);
+ if (!is_array($values) || empty($values) || !is_array($criteria) || empty($criteria)) {
return $chart;
}
}
$xValueLabels[] = (string) $xVal;
- foreach ($criterias as $criteria) {
+ foreach ($criteria as $criteria) {
$xReferences[$criteria][$xVal] = (double) CRM_Utils_Array::value($criteria, $yVal, 0);
$yValues[] = (double) CRM_Utils_Array::value($criteria, $yVal, 0);
}
$count = 0;
foreach ($xReferences as $criteria => $values) {
$toolTipVal = $tooltip;
- // for seperate tooltip for each criteria
+ // for separate tooltip for each criteria
if (is_array($tooltip)) {
$toolTipVal = CRM_Utils_Array::value($criteria, $tooltip, "$symbol #val#");
}
$xValues[$count] = new bar_3d();
// set colour pattel
$xValues[$count]->set_colour(self::$_colours[$count]);
- // define colur pattel with bar criterias
+ // define colur pattel with bar criteria
$xValues[$count]->key((string) $criteria, 12);
// define bar chart values
$xValues[$count]->set_values(array_values($values));