| 
									
										
										
										
											2014-07-14 14:59:53 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * Created by PhpStorm. | 
					
						
							|  |  |  |  * User: Wiktor Trzonkowski | 
					
						
							|  |  |  |  * Date: 6/17/14 | 
					
						
							|  |  |  |  * Time: 12:11 PM | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  | class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Axis Number | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var  array of mixed | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private $axisNumber = array( | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |         'format' => self::FORMAT_CODE_GENERAL, | 
					
						
							|  |  |  |         'source_linked' => 1 | 
					
						
							|  |  |  |     ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Axis Options | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var  array of mixed | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private $axisOptions = array( | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |         'minimum' => null, | 
					
						
							|  |  |  |         'maximum' => null, | 
					
						
							|  |  |  |         'major_unit' => null, | 
					
						
							|  |  |  |         'minor_unit' => null, | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |         'orientation' => self::ORIENTATION_NORMAL, | 
					
						
							|  |  |  |         'minor_tick_mark' => self::TICK_MARK_NONE, | 
					
						
							|  |  |  |         'major_tick_mark' => self::TICK_MARK_NONE, | 
					
						
							|  |  |  |         'axis_labels' => self::AXIS_LABELS_NEXT_TO, | 
					
						
							|  |  |  |         'horizontal_crosses' => self::HORIZONTAL_CROSSES_AUTOZERO, | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |         'horizontal_crosses_value' => null | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |     ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Fill Properties | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var  array of mixed | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private $fillProperties = array( | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |         'type' => self::EXCEL_COLOR_TYPE_ARGB, | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |         'value' => null, | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |         'alpha' => 0 | 
					
						
							|  |  |  |     ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Line Properties | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var  array of mixed | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private $lineProperties = array( | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |         'type' => self::EXCEL_COLOR_TYPE_ARGB, | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |         'value' => null, | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |         'alpha' => 0 | 
					
						
							|  |  |  |     ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Line Style Properties | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var  array of mixed | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private $lineStyleProperties = array( | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |         'width' => '9525', | 
					
						
							|  |  |  |         'compound' => self::LINE_STYLE_COMPOUND_SIMPLE, | 
					
						
							|  |  |  |         'dash' => self::LINE_STYLE_DASH_SOLID, | 
					
						
							|  |  |  |         'cap' => self::LINE_STYLE_CAP_FLAT, | 
					
						
							|  |  |  |         'join' => self::LINE_STYLE_JOIN_BEVEL, | 
					
						
							|  |  |  |         'arrow' => array( | 
					
						
							|  |  |  |             'head' => array( | 
					
						
							|  |  |  |                 'type' => self::LINE_STYLE_ARROW_TYPE_NOARROW, | 
					
						
							|  |  |  |                 'size' => self::LINE_STYLE_ARROW_SIZE_5 | 
					
						
							|  |  |  |             ), | 
					
						
							|  |  |  |             'end' => array( | 
					
						
							|  |  |  |                 'type' => self::LINE_STYLE_ARROW_TYPE_NOARROW, | 
					
						
							|  |  |  |                 'size' => self::LINE_STYLE_ARROW_SIZE_8 | 
					
						
							|  |  |  |             ), | 
					
						
							|  |  |  |         ) | 
					
						
							|  |  |  |     ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Shadow Properties | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var  array of mixed | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private $shadowProperties = array( | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |         'presets' => self::SHADOW_PRESETS_NOSHADOW, | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |         'effect' => null, | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |         'color' => array( | 
					
						
							|  |  |  |             'type' => self::EXCEL_COLOR_TYPE_STANDARD, | 
					
						
							|  |  |  |             'value' => 'black', | 
					
						
							|  |  |  |             'alpha' => 40, | 
					
						
							|  |  |  |         ), | 
					
						
							|  |  |  |         'size' => array( | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |             'sx' => null, | 
					
						
							|  |  |  |             'sy' => null, | 
					
						
							|  |  |  |             'kx' => null | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |         ), | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |         'blur' => null, | 
					
						
							|  |  |  |         'direction' => null, | 
					
						
							|  |  |  |         'distance' => null, | 
					
						
							|  |  |  |         'algn' => null, | 
					
						
							|  |  |  |         'rotWithShape' => null | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |     ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Glow Properties | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var  array of mixed | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private $glowProperties = array( | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |         'size' => null, | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |         'color' => array( | 
					
						
							|  |  |  |             'type' => self::EXCEL_COLOR_TYPE_STANDARD, | 
					
						
							|  |  |  |             'value' => 'black', | 
					
						
							|  |  |  |             'alpha' => 40 | 
					
						
							|  |  |  |         ) | 
					
						
							|  |  |  |     ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Soft Edge Properties | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var  array of mixed | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private $softEdges = array( | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |         'size' => null | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |     ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get Series Data Type | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return  string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |     public function setAxisNumberProperties($format_code) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         $this->axisNumber['format'] = (string) $format_code; | 
					
						
							|  |  |  |         $this->axisNumber['source_linked'] = 0; | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get Axis Number Format Data Type | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return  string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |     public function getAxisNumberFormat() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         return $this->axisNumber['format']; | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get Axis Number Source Linked | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return  string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-12 07:00:59 +00:00
										 |  |  |     public function getAxisNumberSourceLinked() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         return (string) $this->axisNumber['source_linked']; | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Set Axis Options Properties | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param string $axis_labels | 
					
						
							|  |  |  |      * @param string $horizontal_crosses_value | 
					
						
							|  |  |  |      * @param string $horizontal_crosses | 
					
						
							|  |  |  |      * @param string $axis_orientation | 
					
						
							|  |  |  |      * @param string $major_tmt | 
					
						
							|  |  |  |      * @param string $minor_tmt | 
					
						
							|  |  |  |      * @param string $minimum | 
					
						
							|  |  |  |      * @param string $maximum | 
					
						
							|  |  |  |      * @param string $major_unit | 
					
						
							|  |  |  |      * @param string $minor_unit | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-12 12:01:22 +00:00
										 |  |  |     public function setAxisOptionsProperties($axis_labels, $horizontal_crosses_value = null, $horizontal_crosses = null, $axis_orientation = null, $major_tmt = null, $minor_tmt = null, $minimum = null, $maximum = null, $major_unit = null, $minor_unit = null) | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         $this->axisOptions['axis_labels'] = (string) $axis_labels; | 
					
						
							|  |  |  |         ($horizontal_crosses_value !== null) ? $this->axisOptions['horizontal_crosses_value'] = (string) $horizontal_crosses_value : null; | 
					
						
							|  |  |  |         ($horizontal_crosses !== null) ? $this->axisOptions['horizontal_crosses'] = (string) $horizontal_crosses : null; | 
					
						
							|  |  |  |         ($axis_orientation !== null) ? $this->axisOptions['orientation'] = (string) $axis_orientation : null; | 
					
						
							|  |  |  |         ($major_tmt !== null) ? $this->axisOptions['major_tick_mark'] = (string) $major_tmt : null; | 
					
						
							|  |  |  |         ($minor_tmt !== null) ? $this->axisOptions['minor_tick_mark'] = (string) $minor_tmt : null; | 
					
						
							|  |  |  |         ($minor_tmt !== null) ? $this->axisOptions['minor_tick_mark'] = (string) $minor_tmt : null; | 
					
						
							|  |  |  |         ($minimum !== null) ? $this->axisOptions['minimum'] = (string) $minimum : null; | 
					
						
							|  |  |  |         ($maximum !== null) ? $this->axisOptions['maximum'] = (string) $maximum : null; | 
					
						
							|  |  |  |         ($major_unit !== null) ? $this->axisOptions['major_unit'] = (string) $major_unit : null; | 
					
						
							|  |  |  |         ($minor_unit !== null) ? $this->axisOptions['minor_unit'] = (string) $minor_unit : null; | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get Axis Options Property | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param string $property | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-12 12:01:22 +00:00
										 |  |  |     public function getAxisOptionsProperty($property) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         return $this->axisOptions[$property]; | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Set Axis Orientation Property | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param string $orientation | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-12 12:01:22 +00:00
										 |  |  |     public function setAxisOrientation($orientation) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |         $this->orientation = (string) $orientation; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Set Fill Property | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param string $color | 
					
						
							|  |  |  |      * @param int $alpha | 
					
						
							|  |  |  |      * @param string $type | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-12 12:01:22 +00:00
										 |  |  |     public function setFillParameters($color, $alpha = 0, $type = self::EXCEL_COLOR_TYPE_ARGB) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         $this->fillProperties = $this->setColorProperties($color, $alpha, $type); | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Set Line Property | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param string $color | 
					
						
							|  |  |  |      * @param int $alpha | 
					
						
							|  |  |  |      * @param string $type | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-12 12:01:22 +00:00
										 |  |  |     public function setLineParameters($color, $alpha = 0, $type = self::EXCEL_COLOR_TYPE_ARGB) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         $this->lineProperties = $this->setColorProperties($color, $alpha, $type); | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get Fill Property | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param string $property | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-12 12:01:22 +00:00
										 |  |  |     public function getFillProperty($property) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         return $this->fillProperties[$property]; | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get Line Property | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param string $property | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-12 12:01:22 +00:00
										 |  |  |     public function getLineProperty($property) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         return $this->lineProperties[$property]; | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2014-07-14 14:59:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Set Line Style Properties | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param float $line_width | 
					
						
							|  |  |  |      * @param string $compound_type | 
					
						
							|  |  |  |      * @param string $dash_type | 
					
						
							|  |  |  |      * @param string $cap_type | 
					
						
							|  |  |  |      * @param string $join_type | 
					
						
							|  |  |  |      * @param string $head_arrow_type | 
					
						
							|  |  |  |      * @param string $head_arrow_size | 
					
						
							|  |  |  |      * @param string $end_arrow_type | 
					
						
							|  |  |  |      * @param string $end_arrow_size | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     public function setLineStyleProperties($line_width = null, $compound_type = null, $dash_type = null, $cap_type = null, $join_type = null, $head_arrow_type = null, $head_arrow_size = null, $end_arrow_type = null, $end_arrow_size = null) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         (!is_null($line_width)) ? $this->lineStyleProperties['width'] = $this->getExcelPointsWidth((float) $line_width) : null; | 
					
						
							|  |  |  |         (!is_null($compound_type)) ? $this->lineStyleProperties['compound'] = (string) $compound_type : null; | 
					
						
							|  |  |  |         (!is_null($dash_type)) ? $this->lineStyleProperties['dash'] = (string) $dash_type : null; | 
					
						
							|  |  |  |         (!is_null($cap_type)) ? $this->lineStyleProperties['cap'] = (string) $cap_type : null; | 
					
						
							|  |  |  |         (!is_null($join_type)) ? $this->lineStyleProperties['join'] = (string) $join_type : null; | 
					
						
							|  |  |  |         (!is_null($head_arrow_type)) ? $this->lineStyleProperties['arrow']['head']['type'] = (string) $head_arrow_type : null; | 
					
						
							|  |  |  |         (!is_null($head_arrow_size)) ? $this->lineStyleProperties['arrow']['head']['size'] = (string) $head_arrow_size : null; | 
					
						
							|  |  |  |         (!is_null($end_arrow_type)) ? $this->lineStyleProperties['arrow']['end']['type'] = (string) $end_arrow_type : null; | 
					
						
							|  |  |  |         (!is_null($end_arrow_size)) ? $this->lineStyleProperties['arrow']['end']['size'] = (string) $end_arrow_size : null; | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get Line Style Property | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param array|string $elements | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return string | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function getLineStyleProperty($elements) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         return $this->getArrayElementsValue($this->lineStyleProperties, $elements); | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get Line Style Arrow Excel Width | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param string $arrow | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return string | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function getLineStyleArrowWidth($arrow) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         return $this->getLineStyleArrowSize($this->lineStyleProperties['arrow'][$arrow]['size'], 'w'); | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get Line Style Arrow Excel Length | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param string $arrow | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return string | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function getLineStyleArrowLength($arrow) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |         return $this->getLineStyleArrowSize($this->lineStyleProperties['arrow'][$arrow]['size'], 'len'); | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Set Shadow Properties | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param int $shadow_presets | 
					
						
							|  |  |  |      * @param string $sh_color_value | 
					
						
							|  |  |  |      * @param string $sh_color_type | 
					
						
							|  |  |  |      * @param string $sh_color_alpha | 
					
						
							|  |  |  |      * @param float $sh_blur | 
					
						
							|  |  |  |      * @param int $sh_angle | 
					
						
							|  |  |  |      * @param float $sh_distance | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     public function setShadowProperties($sh_presets, $sh_color_value = null, $sh_color_type = null, $sh_color_alpha = null, $sh_blur = null, $sh_angle = null, $sh_distance = null) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $this->setShadowPresetsProperties((int) $sh_presets) | 
					
						
							|  |  |  |             ->setShadowColor( | 
					
						
							|  |  |  |                 is_null($sh_color_value) ? $this->shadowProperties['color']['value'] : $sh_color_value, | 
					
						
							|  |  |  |                 is_null($sh_color_alpha) ? (int) $this->shadowProperties['color']['alpha'] : $sh_color_alpha, | 
					
						
							|  |  |  |                 is_null($sh_color_type) ? $this->shadowProperties['color']['type'] : $sh_color_type | 
					
						
							|  |  |  |             ) | 
					
						
							|  |  |  |             ->setShadowBlur($sh_blur) | 
					
						
							|  |  |  |             ->setShadowAngle($sh_angle) | 
					
						
							|  |  |  |             ->setShadowDistance($sh_distance); | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Set Shadow Color | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param int $shadow_presets | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return PHPExcel_Chart_Axis | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private function setShadowPresetsProperties($shadow_presets) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $this->shadowProperties['presets'] = $shadow_presets; | 
					
						
							|  |  |  |         $this->setShadowProperiesMapValues($this->getShadowPresetsMap($shadow_presets)); | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         return $this; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Set Shadow Properties from Maped Values | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param array $properties_map | 
					
						
							|  |  |  |      * @param * $reference | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return PHPExcel_Chart_Axis | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private function setShadowProperiesMapValues(array $properties_map, &$reference = null) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |         $base_reference = $reference; | 
					
						
							|  |  |  |         foreach ($properties_map as $property_key => $property_val) { | 
					
						
							|  |  |  |             if (is_array($property_val)) { | 
					
						
							|  |  |  |                 if ($reference === null) { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |                     $reference = & $this->shadowProperties[$property_key]; | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |                 } else { | 
					
						
							|  |  |  |                     $reference = & $reference[$property_key]; | 
					
						
							|  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |                 $this->setShadowProperiesMapValues($property_val, $reference); | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |             } else { | 
					
						
							|  |  |  |                 if ($base_reference === null) { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |                     $this->shadowProperties[$property_key] = $property_val; | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |                 } else { | 
					
						
							|  |  |  |                     $reference[$property_key] = $property_val; | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         return $this; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Set Shadow Color | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param string $color | 
					
						
							|  |  |  |      * @param int $alpha | 
					
						
							|  |  |  |      * @param string $type | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return PHPExcel_Chart_Axis | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private function setShadowColor($color, $alpha, $type) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $this->shadowProperties['color'] = $this->setColorProperties($color, $alpha, $type); | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         return $this; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Set Shadow Blur | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param float $blur | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return PHPExcel_Chart_Axis | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private function setShadowBlur($blur) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |         if ($blur !== null) { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |             $this->shadowProperties['blur'] = (string) $this->getExcelPointsWidth($blur); | 
					
						
							| 
									
										
										
										
											2014-07-14 14:59:53 +00:00
										 |  |  |         } | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         return $this; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Set Shadow Angle | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param int $angle | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return PHPExcel_Chart_Axis | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private function setShadowAngle($angle) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |         if ($angle !== null) { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |             $this->shadowProperties['direction'] = (string) $this->getExcelPointsAngle($angle); | 
					
						
							| 
									
										
										
										
											2014-07-14 14:59:53 +00:00
										 |  |  |         } | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         return $this; | 
					
						
							| 
									
										
										
										
											2014-07-14 14:59:53 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Set Shadow Distance | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param float $distance | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return PHPExcel_Chart_Axis | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private function setShadowDistance($distance) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |         if ($distance !== null) { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |             $this->shadowProperties['distance'] = (string) $this->getExcelPointsWidth($distance); | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         return $this; | 
					
						
							| 
									
										
										
										
											2014-07-14 14:59:53 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Get Glow Property | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param float $size | 
					
						
							|  |  |  |      * @param string $color_value | 
					
						
							|  |  |  |      * @param int $color_alpha | 
					
						
							|  |  |  |      * @param string $color_type | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     public function getShadowProperty($elements) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         return $this->getArrayElementsValue($this->shadowProperties, $elements); | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2014-07-14 14:59:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Set Glow Properties | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param float $size | 
					
						
							|  |  |  |      * @param string $color_value | 
					
						
							|  |  |  |      * @param int $color_alpha | 
					
						
							|  |  |  |      * @param string $color_type | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     public function setGlowProperties($size, $color_value = null, $color_alpha = null, $color_type = null) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $this->setGlowSize($size) | 
					
						
							|  |  |  |             ->setGlowColor( | 
					
						
							|  |  |  |                 is_null($color_value) ? $this->glowProperties['color']['value'] : $color_value, | 
					
						
							|  |  |  |                 is_null($color_alpha) ? (int) $this->glowProperties['color']['alpha'] : $color_alpha, | 
					
						
							|  |  |  |                 is_null($color_type) ? $this->glowProperties['color']['type'] : $color_type | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |             ); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2014-07-14 14:59:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Get Glow Property | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param array|string $property | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     public function getGlowProperty($property) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         return $this->getArrayElementsValue($this->glowProperties, $property); | 
					
						
							| 
									
										
										
										
											2014-07-14 14:59:53 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Set Glow Color | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param float $size | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return PHPExcel_Chart_Axis | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private function setGlowSize($size) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |         if (!is_null($size)) { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |             $this->glowProperties['size'] = $this->getExcelPointsWidth($size); | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         return $this; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2014-07-14 14:59:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Set Glow Color | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param string $color | 
					
						
							|  |  |  |      * @param int $alpha | 
					
						
							|  |  |  |      * @param string $type | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return PHPExcel_Chart_Axis | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     private function setGlowColor($color, $alpha, $type) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $this->glowProperties['color'] = $this->setColorProperties($color, $alpha, $type); | 
					
						
							| 
									
										
										
										
											2014-07-14 14:59:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |         return $this; | 
					
						
							| 
									
										
										
										
											2014-07-14 14:59:53 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Set Soft Edges Size | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param float $size | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     public function setSoftEdges($size) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |         if (!is_null($size)) { | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |             $softEdges['size'] = (string) $this->getExcelPointsWidth($size); | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |         } | 
					
						
							| 
									
										
										
										
											2014-07-14 14:59:53 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Get Soft Edges Size | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-15 08:11:18 +00:00
										 |  |  |     public function getSoftEdgesSize() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         return $this->softEdges['size']; | 
					
						
							| 
									
										
										
										
											2014-07-14 14:59:53 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2015-05-13 16:00:22 +00:00
										 |  |  | } |