+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
+ | Copyright CiviCRM LLC (c) 2004-2016 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
+ * @copyright CiviCRM LLC (c) 2004-2016
*/
require_once 'packages/OpenFlashChart/php-ofc-library/open-flash-chart.php';
$xValues = array_keys($values[0]);
$yValues = array_values($values[0]);
- //set y axis parameters.
+ // set y axis parameters.
$yMin = 0;
// calculate max scale for graph.
$xAxis = new x_axis();
$xAxis->set_labels($xLabels);
- //create y axis and set range.
+ // create y axis and set range.
$yAxis = new y_axis();
$yAxis->set_range($yMin, $yMax, $ySteps);
}
$graphTitle = !empty($params['legend']) ? $params['legend'] : ts('Pie Chart');
- //get the currency.
+ // get the currency.
$config = CRM_Core_Config::singleton();
$symbol = $config->defaultCurrencySymbol;
$pie->set_values($values);
- //create chart.
+ // create chart.
$chart = new open_flash_chart();
// create chart title obj.
$chartTitle = !empty($params['legend']) ? $params['legend'] : ts('Bar Chart');
- //set y axis parameters.
+ // set y axis parameters.
$yMin = 0;
// calculate max scale for graph.
$xAxis = new x_axis();
$xAxis->set_labels($xLabels);
- //create y axis and set range.
+ // create y axis and set range.
$yAxis = new y_axis();
$yAxis->set_range($yMin, $yMax, $ySteps);
$chartData['tip'] = $rows['tip'];
}
- //legend
+ // legend
$chartData['xname'] = CRM_Utils_Array::value('xname', $rows);
$chartData['yname'] = CRM_Utils_Array::value('yname', $rows);
if ($chart == 'barChart') {
$ySize = CRM_Utils_Array::value('ySize', $params, 250);
$xSize = 60 * count($params['values']);
- //hack to show tooltip.
+ // hack to show tooltip.
if ($xSize < 200) {
$xSize = (count($params['values']) > 1) ? 100 * count($params['values']) : 170;
}