| 
									
										
										
										
											2012-02-08 21:17:39 +00:00
										 |  |  | <?php | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-02-08 21:17:39 +00:00
										 |  |  | /** | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |  * PHPExcel_Chart_DataSeriesValues | 
					
						
							| 
									
										
										
										
											2012-02-08 21:17:39 +00:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |  * Copyright (c) 2006 - 2015 PHPExcel | 
					
						
							| 
									
										
										
										
											2012-02-08 21:17:39 +00:00
										 |  |  |  * | 
					
						
							|  |  |  |  * This library is free software; you can redistribute it and/or | 
					
						
							|  |  |  |  * modify it under the terms of the GNU Lesser General Public | 
					
						
							|  |  |  |  * License as published by the Free Software Foundation; either | 
					
						
							|  |  |  |  * version 2.1 of the License, or (at your option) any later version. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This library is distributed in the hope that it will be useful, | 
					
						
							|  |  |  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
					
						
							|  |  |  |  * Lesser General Public License for more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * You should have received a copy of the GNU Lesser General Public | 
					
						
							|  |  |  |  * License along with this library; if not, write to the Free Software | 
					
						
							|  |  |  |  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |  * @category    PHPExcel | 
					
						
							|  |  |  |  * @package        PHPExcel_Chart | 
					
						
							|  |  |  |  * @copyright    Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) | 
					
						
							|  |  |  |  * @license        http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL | 
					
						
							|  |  |  |  * @version        ##VERSION##, ##DATE##
 | 
					
						
							| 
									
										
										
										
											2012-02-08 21:17:39 +00:00
										 |  |  |  */ | 
					
						
							|  |  |  | class PHPExcel_Chart_DataSeriesValues | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |     const DATASERIES_TYPE_STRING    = 'String'; | 
					
						
							|  |  |  |     const DATASERIES_TYPE_NUMBER    = 'Number'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private static $dataTypeValues = array( | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |         self::DATASERIES_TYPE_STRING, | 
					
						
							|  |  |  |         self::DATASERIES_TYPE_NUMBER, | 
					
						
							|  |  |  |     ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Series Data Type | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var    string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private $dataType; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Series Data Source | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var    string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private $dataSource; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Format Code | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var    string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private $formatCode; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Series Point Marker | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var    string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private $pointMarker; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Point Count (The number of datapoints in the dataseries) | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var    integer | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private $pointCount = 0; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Data Values | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var    array of mixed | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private $dataValues = array(); | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Create a new PHPExcel_Chart_DataSeriesValues object | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function __construct($dataType = self::DATASERIES_TYPE_NUMBER, $dataSource = null, $formatCode = null, $pointCount = 0, $dataValues = array(), $marker = null) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $this->setDataType($dataType); | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         $this->dataSource = $dataSource; | 
					
						
							|  |  |  |         $this->formatCode = $formatCode; | 
					
						
							|  |  |  |         $this->pointCount = $pointCount; | 
					
						
							|  |  |  |         $this->dataValues = $dataValues; | 
					
						
							|  |  |  |         $this->pointMarker = $marker; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get Series Data Type | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return    string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     public function getDataType() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         return $this->dataType; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Set Series Data Type | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param    string    $dataType    Datatype of this data series | 
					
						
							|  |  |  |      *                                Typical values are: | 
					
						
							|  |  |  |      *                                    PHPExcel_Chart_DataSeriesValues::DATASERIES_TYPE_STRING | 
					
						
							|  |  |  |      *                                        Normally used for axis point values | 
					
						
							|  |  |  |      *                                    PHPExcel_Chart_DataSeriesValues::DATASERIES_TYPE_NUMBER | 
					
						
							|  |  |  |      *                                        Normally used for chart data values | 
					
						
							|  |  |  |      * @return    PHPExcel_Chart_DataSeriesValues | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     public function setDataType($dataType = self::DATASERIES_TYPE_NUMBER) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         if (!in_array($dataType, self::$dataTypeValues)) { | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |             throw new PHPExcel_Chart_Exception('Invalid datatype for chart data series values'); | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         $this->dataType = $dataType; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         return $this; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get Series Data Source (formula) | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return    string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     public function getDataSource() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         return $this->dataSource; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Set Series Data Source (formula) | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param    string    $dataSource | 
					
						
							|  |  |  |      * @return    PHPExcel_Chart_DataSeriesValues | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     public function setDataSource($dataSource = null, $refreshDataValues = true) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         $this->dataSource = $dataSource; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if ($refreshDataValues) { | 
					
						
							|  |  |  |             //    TO DO
 | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         return $this; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get Point Marker | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     public function getPointMarker() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         return $this->pointMarker; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Set Point Marker | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param    string    $marker | 
					
						
							|  |  |  |      * @return    PHPExcel_Chart_DataSeriesValues | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     public function setPointMarker($marker = null) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         $this->pointMarker = $marker; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         return $this; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get Series Format Code | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return    string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     public function getFormatCode() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         return $this->formatCode; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Set Series Format Code | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param    string    $formatCode | 
					
						
							|  |  |  |      * @return    PHPExcel_Chart_DataSeriesValues | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     public function setFormatCode($formatCode = null) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         $this->formatCode = $formatCode; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         return $this; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get Series Point Count | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return    integer | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     public function getPointCount() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         return $this->pointCount; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Identify if the Data Series is a multi-level or a simple series | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return    boolean | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     public function isMultiLevelSeries() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         if (count($this->dataValues) > 0) { | 
					
						
							|  |  |  |             return is_array($this->dataValues[0]); | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |         } | 
					
						
							|  |  |  |         return null; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Return the level count of a multi-level Data Series | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return    boolean | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     public function multiLevelCount() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |         $levelCount = 0; | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         foreach ($this->dataValues as $dataValueSet) { | 
					
						
							|  |  |  |             $levelCount = max($levelCount, count($dataValueSet)); | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |         } | 
					
						
							|  |  |  |         return $levelCount; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get Series Data Values | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return    array of mixed | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     public function getDataValues() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         return $this->dataValues; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get the first Series Data value | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return    mixed | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     public function getDataValue() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         $count = count($this->dataValues); | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |         if ($count == 0) { | 
					
						
							|  |  |  |             return null; | 
					
						
							|  |  |  |         } elseif ($count == 1) { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |             return $this->dataValues[0]; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |         } | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         return $this->dataValues; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Set Series Data Values | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param    array    $dataValues | 
					
						
							|  |  |  |      * @param    boolean    $refreshDataSource | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |      *                    TRUE - refresh the value of dataSource based on the values of $dataValues | 
					
						
							|  |  |  |      *                    FALSE - don't change the value of dataSource | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |      * @return    PHPExcel_Chart_DataSeriesValues | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     public function setDataValues($dataValues = array(), $refreshDataSource = true) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         $this->dataValues = PHPExcel_Calculation_Functions::flattenArray($dataValues); | 
					
						
							|  |  |  |         $this->pointCount = count($dataValues); | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if ($refreshDataSource) { | 
					
						
							|  |  |  |             //    TO DO
 | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         return $this; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private function stripNulls($var) | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     { | 
					
						
							|  |  |  |         return $var !== null; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |     public function refresh(PHPExcel_Worksheet $worksheet, $flatten = true) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         if ($this->dataSource !== null) { | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |             $calcEngine = PHPExcel_Calculation::getInstance($worksheet->getParent()); | 
					
						
							|  |  |  |             $newDataValues = PHPExcel_Calculation::_unwrapResult( | 
					
						
							|  |  |  |                 $calcEngine->_calculateFormulaValue( | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |                     '='.$this->dataSource, | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |                     null, | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |                     $worksheet->getCell('A1') | 
					
						
							|  |  |  |                 ) | 
					
						
							|  |  |  |             ); | 
					
						
							|  |  |  |             if ($flatten) { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |                 $this->dataValues = PHPExcel_Calculation_Functions::flattenArray($newDataValues); | 
					
						
							|  |  |  |                 foreach ($this->dataValues as &$dataValue) { | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |                     if ((!empty($dataValue)) && ($dataValue[0] == '#')) { | 
					
						
							|  |  |  |                         $dataValue = 0.0; | 
					
						
							|  |  |  |                     } | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |                 unset($dataValue); | 
					
						
							|  |  |  |             } else { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |                 $cellRange = explode('!', $this->dataSource); | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |                 if (count($cellRange) > 1) { | 
					
						
							| 
									
										
										
										
											2015-05-13 10:27:01 +00:00
										 |  |  |                     list(, $cellRange) = $cellRange; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |                 } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-14 22:50:28 +00:00
										 |  |  |                 $dimensions = PHPExcel_Cell::rangeDimension(str_replace('$', '', $cellRange)); | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |                 if (($dimensions[0] == 1) || ($dimensions[1] == 1)) { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |                     $this->dataValues = PHPExcel_Calculation_Functions::flattenArray($newDataValues); | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |                 } else { | 
					
						
							|  |  |  |                     $newArray = array_values(array_shift($newDataValues)); | 
					
						
							| 
									
										
										
										
											2015-05-13 10:27:01 +00:00
										 |  |  |                     foreach ($newArray as $i => $newDataSet) { | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |                         $newArray[$i] = array($newDataSet); | 
					
						
							|  |  |  |                     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-13 10:27:01 +00:00
										 |  |  |                     foreach ($newDataValues as $newDataSet) { | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |                         $i = 0; | 
					
						
							| 
									
										
										
										
											2015-05-13 10:27:01 +00:00
										 |  |  |                         foreach ($newDataSet as $newDataVal) { | 
					
						
							|  |  |  |                             array_unshift($newArray[$i++], $newDataVal); | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |                         } | 
					
						
							|  |  |  |                     } | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |                     $this->dataValues = $newArray; | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |                 } | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |             $this->pointCount = count($this->dataValues); | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2012-02-08 21:17:39 +00:00
										 |  |  | } |