Layout.php 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. /**
  8. * PHPExcel_Chart_Layout
  9. *
  10. * @category PHPExcel
  11. * @package PHPExcel_Chart
  12. * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
  13. */
  14. class PHPExcel_Chart_Layout
  15. {
  16. /**
  17. * layoutTarget
  18. *
  19. * @var string
  20. */
  21. private $layoutTarget;
  22. /**
  23. * X Mode
  24. *
  25. * @var string
  26. */
  27. private $xMode;
  28. /**
  29. * Y Mode
  30. *
  31. * @var string
  32. */
  33. private $yMode;
  34. /**
  35. * X-Position
  36. *
  37. * @var float
  38. */
  39. private $xPos;
  40. /**
  41. * Y-Position
  42. *
  43. * @var float
  44. */
  45. private $yPos;
  46. /**
  47. * width
  48. *
  49. * @var float
  50. */
  51. private $width;
  52. /**
  53. * height
  54. *
  55. * @var float
  56. */
  57. private $height;
  58. /**
  59. * show legend key
  60. * Specifies that legend keys should be shown in data labels
  61. *
  62. * @var boolean
  63. */
  64. private $showLegendKey;
  65. /**
  66. * show value
  67. * Specifies that the value should be shown in a data label.
  68. *
  69. * @var boolean
  70. */
  71. private $showVal;
  72. /**
  73. * show category name
  74. * Specifies that the category name should be shown in the data label.
  75. *
  76. * @var boolean
  77. */
  78. private $showCatName;
  79. /**
  80. * show data series name
  81. * Specifies that the series name should be shown in the data label.
  82. *
  83. * @var boolean
  84. */
  85. private $showSerName;
  86. /**
  87. * show percentage
  88. * Specifies that the percentage should be shown in the data label.
  89. *
  90. * @var boolean
  91. */
  92. private $showPercent;
  93. /**
  94. * show bubble size
  95. *
  96. * @var boolean
  97. */
  98. private $showBubbleSize;
  99. /**
  100. * show leader lines
  101. * Specifies that leader lines should be shown for the data label.
  102. *
  103. * @var boolean
  104. */
  105. private $showLeaderLines;
  106. /**
  107. * Create a new PHPExcel_Chart_Layout
  108. */
  109. public function __construct($layout = array())
  110. {
  111. if (isset($layout['layoutTarget'])) {
  112. $this->layoutTarget = $layout['layoutTarget'];
  113. }
  114. if (isset($layout['xMode'])) {
  115. $this->xMode = $layout['xMode'];
  116. }
  117. if (isset($layout['yMode'])) {
  118. $this->yMode = $layout['yMode'];
  119. }
  120. if (isset($layout['x'])) {
  121. $this->xPos = (float) $layout['x'];
  122. }
  123. if (isset($layout['y'])) {
  124. $this->yPos = (float) $layout['y'];
  125. }
  126. if (isset($layout['w'])) {
  127. $this->width = (float) $layout['w'];
  128. }
  129. if (isset($layout['h'])) {
  130. $this->height = (float) $layout['h'];
  131. }
  132. }
  133. /**
  134. * Get Layout Target
  135. *
  136. * @return string
  137. */
  138. public function getLayoutTarget()
  139. {
  140. return $this->layoutTarget;
  141. }
  142. /**
  143. * Set Layout Target
  144. *
  145. * @param Layout Target $value
  146. * @return PHPExcel_Chart_Layout
  147. */
  148. public function setLayoutTarget($value)
  149. {
  150. $this->layoutTarget = $value;
  151. return $this;
  152. }
  153. /**
  154. * Get X-Mode
  155. *
  156. * @return string
  157. */
  158. public function getXMode()
  159. {
  160. return $this->xMode;
  161. }
  162. /**
  163. * Set X-Mode
  164. *
  165. * @param X-Mode $value
  166. * @return PHPExcel_Chart_Layout
  167. */
  168. public function setXMode($value)
  169. {
  170. $this->xMode = $value;
  171. return $this;
  172. }
  173. /**
  174. * Get Y-Mode
  175. *
  176. * @return string
  177. */
  178. public function getYMode()
  179. {
  180. return $this->yMode;
  181. }
  182. /**
  183. * Set Y-Mode
  184. *
  185. * @param Y-Mode $value
  186. * @return PHPExcel_Chart_Layout
  187. */
  188. public function setYMode($value)
  189. {
  190. $this->yMode = $value;
  191. return $this;
  192. }
  193. /**
  194. * Get X-Position
  195. *
  196. * @return number
  197. */
  198. public function getXPosition()
  199. {
  200. return $this->xPos;
  201. }
  202. /**
  203. * Set X-Position
  204. *
  205. * @param X-Position $value
  206. * @return PHPExcel_Chart_Layout
  207. */
  208. public function setXPosition($value)
  209. {
  210. $this->xPos = $value;
  211. return $this;
  212. }
  213. /**
  214. * Get Y-Position
  215. *
  216. * @return number
  217. */
  218. public function getYPosition()
  219. {
  220. return $this->yPos;
  221. }
  222. /**
  223. * Set Y-Position
  224. *
  225. * @param Y-Position $value
  226. * @return PHPExcel_Chart_Layout
  227. */
  228. public function setYPosition($value)
  229. {
  230. $this->yPos = $value;
  231. return $this;
  232. }
  233. /**
  234. * Get Width
  235. *
  236. * @return number
  237. */
  238. public function getWidth()
  239. {
  240. return $this->width;
  241. }
  242. /**
  243. * Set Width
  244. *
  245. * @param Width $value
  246. * @return PHPExcel_Chart_Layout
  247. */
  248. public function setWidth($value)
  249. {
  250. $this->width = $value;
  251. return $this;
  252. }
  253. /**
  254. * Get Height
  255. *
  256. * @return number
  257. */
  258. public function getHeight()
  259. {
  260. return $this->height;
  261. }
  262. /**
  263. * Set Height
  264. *
  265. * @param Height $value
  266. * @return PHPExcel_Chart_Layout
  267. */
  268. public function setHeight($value)
  269. {
  270. $this->height = $value;
  271. return $this;
  272. }
  273. /**
  274. * Get show legend key
  275. *
  276. * @return boolean
  277. */
  278. public function getShowLegendKey()
  279. {
  280. return $this->showLegendKey;
  281. }
  282. /**
  283. * Set show legend key
  284. * Specifies that legend keys should be shown in data labels.
  285. *
  286. * @param boolean $value Show legend key
  287. * @return PHPExcel_Chart_Layout
  288. */
  289. public function setShowLegendKey($value)
  290. {
  291. $this->showLegendKey = $value;
  292. return $this;
  293. }
  294. /**
  295. * Get show value
  296. *
  297. * @return boolean
  298. */
  299. public function getShowVal()
  300. {
  301. return $this->showVal;
  302. }
  303. /**
  304. * Set show val
  305. * Specifies that the value should be shown in data labels.
  306. *
  307. * @param boolean $value Show val
  308. * @return PHPExcel_Chart_Layout
  309. */
  310. public function setShowVal($value)
  311. {
  312. $this->showVal = $value;
  313. return $this;
  314. }
  315. /**
  316. * Get show category name
  317. *
  318. * @return boolean
  319. */
  320. public function getShowCatName()
  321. {
  322. return $this->showCatName;
  323. }
  324. /**
  325. * Set show cat name
  326. * Specifies that the category name should be shown in data labels.
  327. *
  328. * @param boolean $value Show cat name
  329. * @return PHPExcel_Chart_Layout
  330. */
  331. public function setShowCatName($value)
  332. {
  333. $this->showCatName = $value;
  334. return $this;
  335. }
  336. /**
  337. * Get show data series name
  338. *
  339. * @return boolean
  340. */
  341. public function getShowSerName()
  342. {
  343. return $this->showSerName;
  344. }
  345. /**
  346. * Set show ser name
  347. * Specifies that the series name should be shown in data labels.
  348. *
  349. * @param boolean $value Show series name
  350. * @return PHPExcel_Chart_Layout
  351. */
  352. public function setShowSerName($value)
  353. {
  354. $this->showSerName = $value;
  355. return $this;
  356. }
  357. /**
  358. * Get show percentage
  359. *
  360. * @return boolean
  361. */
  362. public function getShowPercent()
  363. {
  364. return $this->showPercent;
  365. }
  366. /**
  367. * Set show percentage
  368. * Specifies that the percentage should be shown in data labels.
  369. *
  370. * @param boolean $value Show percentage
  371. * @return PHPExcel_Chart_Layout
  372. */
  373. public function setShowPercent($value)
  374. {
  375. $this->showPercent = $value;
  376. return $this;
  377. }
  378. /**
  379. * Get show bubble size
  380. *
  381. * @return boolean
  382. */
  383. public function getShowBubbleSize()
  384. {
  385. return $this->showBubbleSize;
  386. }
  387. /**
  388. * Set show bubble size
  389. * Specifies that the bubble size should be shown in data labels.
  390. *
  391. * @param boolean $value Show bubble size
  392. * @return PHPExcel_Chart_Layout
  393. */
  394. public function setShowBubbleSize($value)
  395. {
  396. $this->showBubbleSize = $value;
  397. return $this;
  398. }
  399. /**
  400. * Get show leader lines
  401. *
  402. * @return boolean
  403. */
  404. public function getShowLeaderLines()
  405. {
  406. return $this->showLeaderLines;
  407. }
  408. /**
  409. * Set show leader lines
  410. * Specifies that leader lines should be shown in data labels.
  411. *
  412. * @param boolean $value Show leader lines
  413. * @return PHPExcel_Chart_Layout
  414. */
  415. public function setShowLeaderLines($value)
  416. {
  417. $this->showLeaderLines = $value;
  418. return $this;
  419. }
  420. }