Consistent use of return , payment refund handling
This commit is contained in:
@@ -77,51 +77,51 @@ class GoogleChart_Legacy extends GoogleChart {
|
||||
* Calculate our maximum for each side of the chart
|
||||
*/
|
||||
private function maxes() {
|
||||
$return = array();
|
||||
$result = array();
|
||||
|
||||
foreach ($this->_axis as $l => $axis) {
|
||||
if (! isset($return[$axis]))
|
||||
$return[$axis] = 0;
|
||||
if (! isset($result[$axis]))
|
||||
$result[$axis] = 0;
|
||||
|
||||
$return[$axis] += $this->_max[$l]*1.1; // @todo This scaleup should be configurable
|
||||
$result[$axis] += $this->_max[$l]*1.1; // @todo This scaleup should be configurable
|
||||
}
|
||||
|
||||
return $return;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/** CHART FIELDS **/
|
||||
|
||||
private function chd() {
|
||||
$return = array();
|
||||
$result = array();
|
||||
$maxes = $this->maxes();
|
||||
|
||||
// Perform our encoding
|
||||
foreach ($this->_axis as $l => $axis)
|
||||
array_push($return,$this->encode($this->_data[$l],$maxes[$axis]));
|
||||
array_push($result,$this->encode($this->_data[$l],$maxes[$axis]));
|
||||
|
||||
$prefix = (count($maxes) > 1) ? sprintf('%s:',$this->axiscount('yl')) : ':';
|
||||
|
||||
// If encoding is text, we need to separate the series with a |
|
||||
return ($this->_encodetype == 't') ? $prefix.implode('|',$return) : $prefix.implode(',',$return);
|
||||
return ($this->_encodetype == 't') ? $prefix.implode('|',$result) : $prefix.implode(',',$result);
|
||||
}
|
||||
|
||||
private function chm() {
|
||||
$return = array();
|
||||
$result = array();
|
||||
$sc = $this->seriescolors();
|
||||
$i = 0;
|
||||
|
||||
foreach ($this->_axis as $l => $axis) {
|
||||
if ($axis == 'yr')
|
||||
array_push($return,sprintf('%s,%s,%s,%s,%s,%s','D',$sc[$i],$i,0,2,2));// @todo 'D,0,2,2' May need to be configurable
|
||||
array_push($result,sprintf('%s,%s,%s,%s,%s,%s','D',$sc[$i],$i,0,2,2));// @todo 'D,0,2,2' May need to be configurable
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
return count($return) ? implode('|',$return) : '';
|
||||
return count($result) ? implode('|',$result) : '';
|
||||
}
|
||||
|
||||
private function chxl() {
|
||||
$return = array();
|
||||
$result = array();
|
||||
|
||||
// @todo This should be performed better - it may be a wrong assumption that all keys in the series have data.
|
||||
foreach ($this->_data as $series => $data)
|
||||
@@ -130,13 +130,13 @@ class GoogleChart_Legacy extends GoogleChart {
|
||||
}
|
||||
|
||||
private function chxr() {
|
||||
$return = array();
|
||||
$result = array();
|
||||
$i = 1;
|
||||
|
||||
foreach ($this->maxes() as $key => $value)
|
||||
array_push($return,sprintf('%s,0,%s,0',$i++,$value));
|
||||
array_push($result,sprintf('%s,0,%s,0',$i++,$value));
|
||||
|
||||
return implode('|',$return);
|
||||
return implode('|',$result);
|
||||
}
|
||||
|
||||
public function json() {}
|
||||
|
Reference in New Issue
Block a user