Consistent use of return , payment refund handling
This commit is contained in:
@@ -43,9 +43,9 @@ class GoogleChart_ComboChart extends GoogleChart {
|
||||
}
|
||||
|
||||
public function json() {
|
||||
$return = array();
|
||||
$result = array();
|
||||
|
||||
$return['cols'][] = array(
|
||||
$result['cols'][] = array(
|
||||
'id'=>'date',
|
||||
'label'=>'date',
|
||||
'type'=>'string',
|
||||
@@ -53,7 +53,7 @@ class GoogleChart_ComboChart extends GoogleChart {
|
||||
|
||||
// Columns
|
||||
foreach (array_keys($this->_axis) as $l) {
|
||||
$return['cols'][] = array(
|
||||
$result['cols'][] = array(
|
||||
'id'=>$l,
|
||||
'label'=>$l,
|
||||
'type'=>'number',
|
||||
@@ -69,7 +69,7 @@ class GoogleChart_ComboChart extends GoogleChart {
|
||||
foreach ($this->_axis as $l => $axis)
|
||||
array_push($data,array('v'=>isset($v[$l]) ? $v[$l] : 0));
|
||||
|
||||
$return['rows'][] = array('c'=>$data);
|
||||
$result['rows'][] = array('c'=>$data);
|
||||
}
|
||||
|
||||
$options = array(
|
||||
@@ -81,7 +81,7 @@ class GoogleChart_ComboChart extends GoogleChart {
|
||||
'series' => $this->series(),
|
||||
);
|
||||
|
||||
return json_encode(array('data'=>$return,'options'=>$options));
|
||||
return json_encode(array('data'=>$result,'options'=>$options));
|
||||
}
|
||||
|
||||
public function render() {
|
||||
@@ -149,7 +149,7 @@ function drawChart_".$this->_divname."() {
|
||||
}
|
||||
|
||||
private function series() {
|
||||
$return = array();
|
||||
$result = array();
|
||||
$c = $this->seriescolors();
|
||||
$j = count($c);
|
||||
|
||||
@@ -157,14 +157,14 @@ function drawChart_".$this->_divname."() {
|
||||
foreach ($this->_axis as $l => $axis) {
|
||||
// @todo This shouldnt be hard coded
|
||||
if ($axis == 'yl')
|
||||
array_push($return,array('type'=>'bar','color'=>$c[$i%$j],'targetAxisIndex'=>0));
|
||||
array_push($result,array('type'=>'bar','color'=>$c[$i%$j],'targetAxisIndex'=>0));
|
||||
else
|
||||
array_push($return,array('type'=>'line','color'=>$c[$i%$j],'targetAxisIndex'=>1));
|
||||
array_push($result,array('type'=>'line','color'=>$c[$i%$j],'targetAxisIndex'=>1));
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
return $return;
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user