| @@ 500-505 (lines=6) @@ | ||
| 497 | $xmax = 0; |
|
| 498 | $ymax = 0; |
|
| 499 | $results = (array) $results; |
|
| 500 | foreach ( $results as $result ) { |
|
| 501 | $regs[] = array( $result->regDate, (int)$result->total ); |
|
| 502 | $xmin = strtotime( $result->regDate ) < strtotime( $xmin ) ? $result->regDate : $xmin; |
|
| 503 | $xmax = strtotime( $result->regDate ) > strtotime( $xmax ) ? $result->regDate : $xmax; |
|
| 504 | $ymax = $result->total > $ymax ? $result->total : $ymax; |
|
| 505 | } |
|
| 506 | ||
| 507 | $xmin = date( 'Y-m-d', strtotime( date( 'Y-m-d', strtotime($xmin)) . ' -1 day' )); |
|
| 508 | $xmax = date( 'Y-m-d', strtotime( date( 'Y-m-d', strtotime($xmax)) . ' +1 day' )); |
|
| @@ 160-165 (lines=6) @@ | ||
| 157 | ||
| 158 | $results = (array) $results; |
|
| 159 | ||
| 160 | foreach ( $results as $result ) { |
|
| 161 | $revenue[] = array( $result->txnDate, (float)$result->revenue ); |
|
| 162 | $xmin = strtotime( $result->txnDate ) < strtotime( $xmin ) ? $result->txnDate : $xmin; |
|
| 163 | $xmax = strtotime( $result->txnDate ) > strtotime( $xmax ) ? $result->txnDate : $xmax; |
|
| 164 | $ymax = $result->revenue > $ymax ? $result->revenue : $ymax; |
|
| 165 | } |
|
| 166 | ||
| 167 | $xmin = date( 'Y-m-d', strtotime( date( 'Y-m-d', strtotime($xmin)) . ' -1 day' )); |
|
| 168 | $xmax = date( 'Y-m-d', strtotime( date( 'Y-m-d', strtotime($xmax)) . ' +1 day' )); |
|