source: sourcecode/application/libraries/PHPExcel/Chart/Layout.php @ 1

Last change on this file since 1 was 1, checked in by dungnv, 11 years ago
File size: 8.2 KB
Line 
1<?php
2/**
3 * PHPExcel
4 *
5 * Copyright (c) 2006 - 2014 PHPExcel
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
20 *
21 * @category    PHPExcel
22 * @package             PHPExcel_Chart
23 * @copyright   Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
24 * @license             http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   LGPL
25 * @version             1.8.0, 2014-03-02
26 */
27
28
29/**
30 * PHPExcel_Chart_Layout
31 *
32 * @category    PHPExcel
33 * @package             PHPExcel_Chart
34 * @copyright   Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
35 */
36class PHPExcel_Chart_Layout
37{
38        /**
39         * layoutTarget
40         *
41         * @var string
42         */
43        private $_layoutTarget = NULL;
44
45        /**
46         * X Mode
47         *
48         * @var string
49         */
50        private $_xMode         = NULL;
51
52        /**
53         * Y Mode
54         *
55         * @var string
56         */
57        private $_yMode         = NULL;
58
59        /**
60         * X-Position
61         *
62         * @var float
63         */
64        private $_xPos          = NULL;
65
66        /**
67         * Y-Position
68         *
69         * @var float
70         */
71        private $_yPos          = NULL;
72
73        /**
74         * width
75         *
76         * @var float
77         */
78        private $_width         = NULL;
79
80        /**
81         * height
82         *
83         * @var float
84         */
85        private $_height        = NULL;
86
87        /**
88         * show legend key
89         * Specifies that legend keys should be shown in data labels
90         *
91         * @var boolean
92         */
93        private $_showLegendKey = NULL;
94
95        /**
96         * show value
97         * Specifies that the value should be shown in a data label.
98         *
99         * @var boolean
100         */
101        private $_showVal       = NULL;
102
103        /**
104         * show category name
105         * Specifies that the category name should be shown in the data label.
106         *
107         * @var boolean
108         */
109        private $_showCatName   = NULL;
110
111        /**
112         * show data series name
113         * Specifies that the series name should be shown in the data label.
114         *
115         * @var boolean
116         */
117        private $_showSerName   = NULL;
118
119        /**
120         * show percentage
121         * Specifies that the percentage should be shown in the data label.
122         *
123         * @var boolean
124         */
125        private $_showPercent   = NULL;
126
127        /**
128         * show bubble size
129         *
130         * @var boolean
131         */
132        private $_showBubbleSize        = NULL;
133
134        /**
135         * show leader lines
136         * Specifies that leader lines should be shown for the data label.
137         *
138         * @var boolean
139         */
140        private $_showLeaderLines       = NULL;
141
142
143        /**
144         * Create a new PHPExcel_Chart_Layout
145         */
146        public function __construct($layout=array())
147        {
148                if (isset($layout['layoutTarget']))     { $this->_layoutTarget  = $layout['layoutTarget'];      }
149                if (isset($layout['xMode']))            { $this->_xMode                 = $layout['xMode'];                     }
150                if (isset($layout['yMode']))            { $this->_yMode                 = $layout['yMode'];                     }
151                if (isset($layout['x']))                        { $this->_xPos                  = (float) $layout['x'];         }
152                if (isset($layout['y']))                        { $this->_yPos                  = (float) $layout['y'];         }
153                if (isset($layout['w']))                        { $this->_width                 = (float) $layout['w'];         }
154                if (isset($layout['h']))                        { $this->_height                = (float) $layout['h'];         }
155        }
156
157        /**
158         * Get Layout Target
159         *
160         * @return string
161         */
162        public function getLayoutTarget() {
163                return $this->_layoutTarget;
164        }
165
166        /**
167         * Set Layout Target
168         *
169         * @param Layout Target $value
170     * @return PHPExcel_Chart_Layout
171         */
172        public function setLayoutTarget($value) {
173                $this->_layoutTarget = $value;
174        return $this;
175        }
176
177        /**
178         * Get X-Mode
179         *
180         * @return string
181         */
182        public function getXMode() {
183                return $this->_xMode;
184        }
185
186        /**
187         * Set X-Mode
188         *
189         * @param X-Mode $value
190     * @return PHPExcel_Chart_Layout
191         */
192        public function setXMode($value) {
193                $this->_xMode = $value;
194        return $this;
195        }
196
197        /**
198         * Get Y-Mode
199         *
200         * @return string
201         */
202        public function getYMode() {
203                return $this->_yMode;
204        }
205
206        /**
207         * Set Y-Mode
208         *
209         * @param Y-Mode $value
210     * @return PHPExcel_Chart_Layout
211         */
212        public function setYMode($value) {
213                $this->_yMode = $value;
214        return $this;
215        }
216
217        /**
218         * Get X-Position
219         *
220         * @return number
221         */
222        public function getXPosition() {
223                return $this->_xPos;
224        }
225
226        /**
227         * Set X-Position
228         *
229         * @param X-Position $value
230     * @return PHPExcel_Chart_Layout
231         */
232        public function setXPosition($value) {
233                $this->_xPos = $value;
234        return $this;
235        }
236
237        /**
238         * Get Y-Position
239         *
240         * @return number
241         */
242        public function getYPosition() {
243                return $this->_yPos;
244        }
245
246        /**
247         * Set Y-Position
248         *
249         * @param Y-Position $value
250     * @return PHPExcel_Chart_Layout
251         */
252        public function setYPosition($value) {
253                $this->_yPos = $value;
254        return $this;
255        }
256
257        /**
258         * Get Width
259         *
260         * @return number
261         */
262        public function getWidth() {
263                return $this->_width;
264        }
265
266        /**
267         * Set Width
268         *
269         * @param Width $value
270     * @return PHPExcel_Chart_Layout
271         */
272        public function setWidth($value) {
273                $this->_width = $value;
274        return $this;
275        }
276
277        /**
278         * Get Height
279         *
280         * @return number
281         */
282        public function getHeight() {
283                return $this->_height;
284        }
285
286        /**
287         * Set Height
288         *
289         * @param Height $value
290     * @return PHPExcel_Chart_Layout
291         */
292        public function setHeight($value) {
293                $this->_height = $value;
294        return $this;
295        }
296
297
298        /**
299         * Get show legend key
300         *
301         * @return boolean
302         */
303        public function getShowLegendKey() {
304                return $this->_showLegendKey;
305        }
306
307        /**
308         * Set show legend key
309         * Specifies that legend keys should be shown in data labels.
310         *
311         * @param boolean $value                Show legend key
312     * @return PHPExcel_Chart_Layout
313         */
314        public function setShowLegendKey($value) {
315                $this->_showLegendKey = $value;
316        return $this;
317        }
318
319        /**
320         * Get show value
321         *
322         * @return boolean
323         */
324        public function getShowVal() {
325                return $this->_showVal;
326        }
327
328        /**
329         * Set show val
330         * Specifies that the value should be shown in data labels.
331         *
332         * @param boolean $value                Show val
333     * @return PHPExcel_Chart_Layout
334         */
335        public function setShowVal($value) {
336                $this->_showVal = $value;
337        return $this;
338        }
339
340        /**
341         * Get show category name
342         *
343         * @return boolean
344         */
345        public function getShowCatName() {
346                return $this->_showCatName;
347        }
348
349        /**
350         * Set show cat name
351         * Specifies that the category name should be shown in data labels.
352         *
353         * @param boolean $value                Show cat name
354     * @return PHPExcel_Chart_Layout
355         */
356        public function setShowCatName($value) {
357                $this->_showCatName = $value;
358        return $this;
359        }
360
361        /**
362         * Get show data series name
363         *
364         * @return boolean
365         */
366        public function getShowSerName() {
367                return $this->_showSerName;
368        }
369
370        /**
371         * Set show ser name
372         * Specifies that the series name should be shown in data labels.
373         *
374         * @param boolean $value                Show series name
375     * @return PHPExcel_Chart_Layout
376         */
377        public function setShowSerName($value) {
378                $this->_showSerName = $value;
379        return $this;
380        }
381
382        /**
383         * Get show percentage
384         *
385         * @return boolean
386         */
387        public function getShowPercent() {
388                return $this->_showPercent;
389        }
390
391        /**
392         * Set show percentage
393         * Specifies that the percentage should be shown in data labels.
394         *
395         * @param boolean $value                Show percentage
396     * @return PHPExcel_Chart_Layout
397         */
398        public function setShowPercent($value) {
399                $this->_showPercent = $value;
400        return $this;
401        }
402
403        /**
404         * Get show bubble size
405         *
406         * @return boolean
407         */
408        public function getShowBubbleSize() {
409                return $this->_showBubbleSize;
410        }
411
412        /**
413         * Set show bubble size
414         * Specifies that the bubble size should be shown in data labels.
415         *
416         * @param boolean $value                Show bubble size
417     * @return PHPExcel_Chart_Layout
418         */
419        public function setShowBubbleSize($value) {
420                $this->_showBubbleSize = $value;
421        return $this;
422        }
423
424        /**
425         * Get show leader lines
426         *
427         * @return boolean
428         */
429        public function getShowLeaderLines() {
430                return $this->_showLeaderLines;
431        }
432
433        /**
434         * Set show leader lines
435         * Specifies that leader lines should be shown in data labels.
436         *
437         * @param boolean $value                Show leader lines
438     * @return PHPExcel_Chart_Layout
439         */
440        public function setShowLeaderLines($value) {
441                $this->_showLeaderLines = $value;
442        return $this;
443        }
444
445}
Note: See TracBrowser for help on using the repository browser.