No Description

Chart.php 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  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_Reader_Excel2007
  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 ##VERSION##, ##DATE##
  26. */
  27. /**
  28. * PHPExcel_Reader_Excel2007_Chart
  29. *
  30. * @category PHPExcel
  31. * @package PHPExcel_Reader_Excel2007
  32. * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
  33. */
  34. class PHPExcel_Reader_Excel2007_Chart
  35. {
  36. private static function _getAttribute($component, $name, $format) {
  37. $attributes = $component->attributes();
  38. if (isset($attributes[$name])) {
  39. if ($format == 'string') {
  40. return (string) $attributes[$name];
  41. } elseif ($format == 'integer') {
  42. return (integer) $attributes[$name];
  43. } elseif ($format == 'boolean') {
  44. return (boolean) ($attributes[$name] === '0' || $attributes[$name] !== 'true') ? false : true;
  45. } else {
  46. return (float) $attributes[$name];
  47. }
  48. }
  49. return null;
  50. } // function _getAttribute()
  51. private static function _readColor($color,$background=false) {
  52. if (isset($color["rgb"])) {
  53. return (string)$color["rgb"];
  54. } else if (isset($color["indexed"])) {
  55. return PHPExcel_Style_Color::indexedColor($color["indexed"]-7,$background)->getARGB();
  56. }
  57. }
  58. public static function readChart($chartElements,$chartName) {
  59. $namespacesChartMeta = $chartElements->getNamespaces(true);
  60. $chartElementsC = $chartElements->children($namespacesChartMeta['c']);
  61. $XaxisLabel = $YaxisLabel = $legend = $title = NULL;
  62. $dispBlanksAs = $plotVisOnly = NULL;
  63. foreach($chartElementsC as $chartElementKey => $chartElement) {
  64. switch ($chartElementKey) {
  65. case "chart":
  66. foreach($chartElement as $chartDetailsKey => $chartDetails) {
  67. $chartDetailsC = $chartDetails->children($namespacesChartMeta['c']);
  68. switch ($chartDetailsKey) {
  69. case "plotArea":
  70. $plotAreaLayout = $XaxisLable = $YaxisLable = null;
  71. $plotSeries = $plotAttributes = array();
  72. foreach($chartDetails as $chartDetailKey => $chartDetail) {
  73. switch ($chartDetailKey) {
  74. case "layout":
  75. $plotAreaLayout = self::_chartLayoutDetails($chartDetail,$namespacesChartMeta,'plotArea');
  76. break;
  77. case "catAx":
  78. if (isset($chartDetail->title)) {
  79. $XaxisLabel = self::_chartTitle($chartDetail->title->children($namespacesChartMeta['c']),$namespacesChartMeta,'cat');
  80. }
  81. break;
  82. case "dateAx":
  83. if (isset($chartDetail->title)) {
  84. $XaxisLabel = self::_chartTitle($chartDetail->title->children($namespacesChartMeta['c']),$namespacesChartMeta,'cat');
  85. }
  86. break;
  87. case "valAx":
  88. if (isset($chartDetail->title)) {
  89. $YaxisLabel = self::_chartTitle($chartDetail->title->children($namespacesChartMeta['c']),$namespacesChartMeta,'cat');
  90. }
  91. break;
  92. case "barChart":
  93. case "bar3DChart":
  94. $barDirection = self::_getAttribute($chartDetail->barDir, 'val', 'string');
  95. $plotSer = self::_chartDataSeries($chartDetail,$namespacesChartMeta,$chartDetailKey);
  96. $plotSer->setPlotDirection($barDirection);
  97. $plotSeries[] = $plotSer;
  98. $plotAttributes = self::_readChartAttributes($chartDetail);
  99. break;
  100. case "lineChart":
  101. case "line3DChart":
  102. $plotSeries[] = self::_chartDataSeries($chartDetail,$namespacesChartMeta,$chartDetailKey);
  103. $plotAttributes = self::_readChartAttributes($chartDetail);
  104. break;
  105. case "areaChart":
  106. case "area3DChart":
  107. $plotSeries[] = self::_chartDataSeries($chartDetail,$namespacesChartMeta,$chartDetailKey);
  108. $plotAttributes = self::_readChartAttributes($chartDetail);
  109. break;
  110. case "doughnutChart":
  111. case "pieChart":
  112. case "pie3DChart":
  113. $explosion = isset($chartDetail->ser->explosion);
  114. $plotSer = self::_chartDataSeries($chartDetail,$namespacesChartMeta,$chartDetailKey);
  115. $plotSer->setPlotStyle($explosion);
  116. $plotSeries[] = $plotSer;
  117. $plotAttributes = self::_readChartAttributes($chartDetail);
  118. break;
  119. case "scatterChart":
  120. $scatterStyle = self::_getAttribute($chartDetail->scatterStyle, 'val', 'string');
  121. $plotSer = self::_chartDataSeries($chartDetail,$namespacesChartMeta,$chartDetailKey);
  122. $plotSer->setPlotStyle($scatterStyle);
  123. $plotSeries[] = $plotSer;
  124. $plotAttributes = self::_readChartAttributes($chartDetail);
  125. break;
  126. case "bubbleChart":
  127. $bubbleScale = self::_getAttribute($chartDetail->bubbleScale, 'val', 'integer');
  128. $plotSer = self::_chartDataSeries($chartDetail,$namespacesChartMeta,$chartDetailKey);
  129. $plotSer->setPlotStyle($bubbleScale);
  130. $plotSeries[] = $plotSer;
  131. $plotAttributes = self::_readChartAttributes($chartDetail);
  132. break;
  133. case "radarChart":
  134. $radarStyle = self::_getAttribute($chartDetail->radarStyle, 'val', 'string');
  135. $plotSer = self::_chartDataSeries($chartDetail,$namespacesChartMeta,$chartDetailKey);
  136. $plotSer->setPlotStyle($radarStyle);
  137. $plotSeries[] = $plotSer;
  138. $plotAttributes = self::_readChartAttributes($chartDetail);
  139. break;
  140. case "surfaceChart":
  141. case "surface3DChart":
  142. $wireFrame = self::_getAttribute($chartDetail->wireframe, 'val', 'boolean');
  143. $plotSer = self::_chartDataSeries($chartDetail,$namespacesChartMeta,$chartDetailKey);
  144. $plotSer->setPlotStyle($wireFrame);
  145. $plotSeries[] = $plotSer;
  146. $plotAttributes = self::_readChartAttributes($chartDetail);
  147. break;
  148. case "stockChart":
  149. $plotSeries[] = self::_chartDataSeries($chartDetail,$namespacesChartMeta,$chartDetailKey);
  150. $plotAttributes = self::_readChartAttributes($plotAreaLayout);
  151. break;
  152. }
  153. }
  154. if ($plotAreaLayout == NULL) {
  155. $plotAreaLayout = new PHPExcel_Chart_Layout();
  156. }
  157. $plotArea = new PHPExcel_Chart_PlotArea($plotAreaLayout,$plotSeries);
  158. self::_setChartAttributes($plotAreaLayout,$plotAttributes);
  159. break;
  160. case "plotVisOnly":
  161. $plotVisOnly = self::_getAttribute($chartDetails, 'val', 'string');
  162. break;
  163. case "dispBlanksAs":
  164. $dispBlanksAs = self::_getAttribute($chartDetails, 'val', 'string');
  165. break;
  166. case "title":
  167. $title = self::_chartTitle($chartDetails,$namespacesChartMeta,'title');
  168. break;
  169. case "legend":
  170. $legendPos = 'r';
  171. $legendLayout = null;
  172. $legendOverlay = false;
  173. foreach($chartDetails as $chartDetailKey => $chartDetail) {
  174. switch ($chartDetailKey) {
  175. case "legendPos":
  176. $legendPos = self::_getAttribute($chartDetail, 'val', 'string');
  177. break;
  178. case "overlay":
  179. $legendOverlay = self::_getAttribute($chartDetail, 'val', 'boolean');
  180. break;
  181. case "layout":
  182. $legendLayout = self::_chartLayoutDetails($chartDetail,$namespacesChartMeta,'legend');
  183. break;
  184. }
  185. }
  186. $legend = new PHPExcel_Chart_Legend($legendPos, $legendLayout, $legendOverlay);
  187. break;
  188. }
  189. }
  190. }
  191. }
  192. $chart = new PHPExcel_Chart($chartName,$title,$legend,$plotArea,$plotVisOnly,$dispBlanksAs,$XaxisLabel,$YaxisLabel);
  193. return $chart;
  194. } // function readChart()
  195. private static function _chartTitle($titleDetails,$namespacesChartMeta,$type) {
  196. $caption = array();
  197. $titleLayout = null;
  198. foreach($titleDetails as $titleDetailKey => $chartDetail) {
  199. switch ($titleDetailKey) {
  200. case "tx":
  201. $titleDetails = $chartDetail->rich->children($namespacesChartMeta['a']);
  202. foreach($titleDetails as $titleKey => $titleDetail) {
  203. switch ($titleKey) {
  204. case "p":
  205. $titleDetailPart = $titleDetail->children($namespacesChartMeta['a']);
  206. $caption[] = self::_parseRichText($titleDetailPart);
  207. }
  208. }
  209. break;
  210. case "layout":
  211. $titleLayout = self::_chartLayoutDetails($chartDetail,$namespacesChartMeta);
  212. break;
  213. }
  214. }
  215. return new PHPExcel_Chart_Title($caption, $titleLayout);
  216. } // function _chartTitle()
  217. private static function _chartLayoutDetails($chartDetail,$namespacesChartMeta) {
  218. if (!isset($chartDetail->manualLayout)) {
  219. return null;
  220. }
  221. $details = $chartDetail->manualLayout->children($namespacesChartMeta['c']);
  222. if (is_null($details)) {
  223. return null;
  224. }
  225. $layout = array();
  226. foreach($details as $detailKey => $detail) {
  227. // echo $detailKey,' => ',self::_getAttribute($detail, 'val', 'string'),PHP_EOL;
  228. $layout[$detailKey] = self::_getAttribute($detail, 'val', 'string');
  229. }
  230. return new PHPExcel_Chart_Layout($layout);
  231. } // function _chartLayoutDetails()
  232. private static function _chartDataSeries($chartDetail,$namespacesChartMeta,$plotType) {
  233. $multiSeriesType = NULL;
  234. $smoothLine = false;
  235. $seriesLabel = $seriesCategory = $seriesValues = $plotOrder = array();
  236. $seriesDetailSet = $chartDetail->children($namespacesChartMeta['c']);
  237. foreach($seriesDetailSet as $seriesDetailKey => $seriesDetails) {
  238. switch ($seriesDetailKey) {
  239. case "grouping":
  240. $multiSeriesType = self::_getAttribute($chartDetail->grouping, 'val', 'string');
  241. break;
  242. case "ser":
  243. $marker = NULL;
  244. foreach($seriesDetails as $seriesKey => $seriesDetail) {
  245. switch ($seriesKey) {
  246. case "idx":
  247. $seriesIndex = self::_getAttribute($seriesDetail, 'val', 'integer');
  248. break;
  249. case "order":
  250. $seriesOrder = self::_getAttribute($seriesDetail, 'val', 'integer');
  251. $plotOrder[$seriesIndex] = $seriesOrder;
  252. break;
  253. case "tx":
  254. $seriesLabel[$seriesIndex] = self::_chartDataSeriesValueSet($seriesDetail,$namespacesChartMeta);
  255. break;
  256. case "marker":
  257. $marker = self::_getAttribute($seriesDetail->symbol, 'val', 'string');
  258. break;
  259. case "smooth":
  260. $smoothLine = self::_getAttribute($seriesDetail, 'val', 'boolean');
  261. break;
  262. case "cat":
  263. $seriesCategory[$seriesIndex] = self::_chartDataSeriesValueSet($seriesDetail,$namespacesChartMeta);
  264. break;
  265. case "val":
  266. $seriesValues[$seriesIndex] = self::_chartDataSeriesValueSet($seriesDetail,$namespacesChartMeta,$marker);
  267. break;
  268. case "xVal":
  269. $seriesCategory[$seriesIndex] = self::_chartDataSeriesValueSet($seriesDetail,$namespacesChartMeta,$marker);
  270. break;
  271. case "yVal":
  272. $seriesValues[$seriesIndex] = self::_chartDataSeriesValueSet($seriesDetail,$namespacesChartMeta,$marker);
  273. break;
  274. }
  275. }
  276. }
  277. }
  278. return new PHPExcel_Chart_DataSeries($plotType,$multiSeriesType,$plotOrder,$seriesLabel,$seriesCategory,$seriesValues,$smoothLine);
  279. } // function _chartDataSeries()
  280. private static function _chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker = null, $smoothLine = false) {
  281. if (isset($seriesDetail->strRef)) {
  282. $seriesSource = (string) $seriesDetail->strRef->f;
  283. $seriesData = self::_chartDataSeriesValues($seriesDetail->strRef->strCache->children($namespacesChartMeta['c']),'s');
  284. return new PHPExcel_Chart_DataSeriesValues('String',$seriesSource,$seriesData['formatCode'],$seriesData['pointCount'],$seriesData['dataValues'],$marker,$smoothLine);
  285. } elseif (isset($seriesDetail->numRef)) {
  286. $seriesSource = (string) $seriesDetail->numRef->f;
  287. $seriesData = self::_chartDataSeriesValues($seriesDetail->numRef->numCache->children($namespacesChartMeta['c']));
  288. return new PHPExcel_Chart_DataSeriesValues('Number',$seriesSource,$seriesData['formatCode'],$seriesData['pointCount'],$seriesData['dataValues'],$marker,$smoothLine);
  289. } elseif (isset($seriesDetail->multiLvlStrRef)) {
  290. $seriesSource = (string) $seriesDetail->multiLvlStrRef->f;
  291. $seriesData = self::_chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlStrRef->multiLvlStrCache->children($namespacesChartMeta['c']),'s');
  292. $seriesData['pointCount'] = count($seriesData['dataValues']);
  293. return new PHPExcel_Chart_DataSeriesValues('String',$seriesSource,$seriesData['formatCode'],$seriesData['pointCount'],$seriesData['dataValues'],$marker,$smoothLine);
  294. } elseif (isset($seriesDetail->multiLvlNumRef)) {
  295. $seriesSource = (string) $seriesDetail->multiLvlNumRef->f;
  296. $seriesData = self::_chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlNumRef->multiLvlNumCache->children($namespacesChartMeta['c']),'s');
  297. $seriesData['pointCount'] = count($seriesData['dataValues']);
  298. return new PHPExcel_Chart_DataSeriesValues('String',$seriesSource,$seriesData['formatCode'],$seriesData['pointCount'],$seriesData['dataValues'],$marker,$smoothLine);
  299. }
  300. return null;
  301. } // function _chartDataSeriesValueSet()
  302. private static function _chartDataSeriesValues($seriesValueSet,$dataType='n') {
  303. $seriesVal = array();
  304. $formatCode = '';
  305. $pointCount = 0;
  306. foreach($seriesValueSet as $seriesValueIdx => $seriesValue) {
  307. switch ($seriesValueIdx) {
  308. case 'ptCount':
  309. $pointCount = self::_getAttribute($seriesValue, 'val', 'integer');
  310. break;
  311. case 'formatCode':
  312. $formatCode = (string) $seriesValue;
  313. break;
  314. case 'pt':
  315. $pointVal = self::_getAttribute($seriesValue, 'idx', 'integer');
  316. if ($dataType == 's') {
  317. $seriesVal[$pointVal] = (string) $seriesValue->v;
  318. } else {
  319. $seriesVal[$pointVal] = (float) $seriesValue->v;
  320. }
  321. break;
  322. }
  323. }
  324. if (empty($seriesVal)) {
  325. $seriesVal = NULL;
  326. }
  327. return array( 'formatCode' => $formatCode,
  328. 'pointCount' => $pointCount,
  329. 'dataValues' => $seriesVal
  330. );
  331. } // function _chartDataSeriesValues()
  332. private static function _chartDataSeriesValuesMultiLevel($seriesValueSet,$dataType='n') {
  333. $seriesVal = array();
  334. $formatCode = '';
  335. $pointCount = 0;
  336. foreach($seriesValueSet->lvl as $seriesLevelIdx => $seriesLevel) {
  337. foreach($seriesLevel as $seriesValueIdx => $seriesValue) {
  338. switch ($seriesValueIdx) {
  339. case 'ptCount':
  340. $pointCount = self::_getAttribute($seriesValue, 'val', 'integer');
  341. break;
  342. case 'formatCode':
  343. $formatCode = (string) $seriesValue;
  344. break;
  345. case 'pt':
  346. $pointVal = self::_getAttribute($seriesValue, 'idx', 'integer');
  347. if ($dataType == 's') {
  348. $seriesVal[$pointVal][] = (string) $seriesValue->v;
  349. } else {
  350. $seriesVal[$pointVal][] = (float) $seriesValue->v;
  351. }
  352. break;
  353. }
  354. }
  355. }
  356. return array( 'formatCode' => $formatCode,
  357. 'pointCount' => $pointCount,
  358. 'dataValues' => $seriesVal
  359. );
  360. } // function _chartDataSeriesValuesMultiLevel()
  361. private static function _parseRichText($titleDetailPart = null) {
  362. $value = new PHPExcel_RichText();
  363. foreach($titleDetailPart as $titleDetailElementKey => $titleDetailElement) {
  364. if (isset($titleDetailElement->t)) {
  365. $objText = $value->createTextRun( (string) $titleDetailElement->t );
  366. }
  367. if (isset($titleDetailElement->rPr)) {
  368. if (isset($titleDetailElement->rPr->rFont["val"])) {
  369. $objText->getFont()->setName((string) $titleDetailElement->rPr->rFont["val"]);
  370. }
  371. $fontSize = (self::_getAttribute($titleDetailElement->rPr, 'sz', 'integer'));
  372. if (!is_null($fontSize)) {
  373. $objText->getFont()->setSize(floor($fontSize / 100));
  374. }
  375. $fontColor = (self::_getAttribute($titleDetailElement->rPr, 'color', 'string'));
  376. if (!is_null($fontColor)) {
  377. $objText->getFont()->setColor( new PHPExcel_Style_Color( self::_readColor($fontColor) ) );
  378. }
  379. $bold = self::_getAttribute($titleDetailElement->rPr, 'b', 'boolean');
  380. if (!is_null($bold)) {
  381. $objText->getFont()->setBold($bold);
  382. }
  383. $italic = self::_getAttribute($titleDetailElement->rPr, 'i', 'boolean');
  384. if (!is_null($italic)) {
  385. $objText->getFont()->setItalic($italic);
  386. }
  387. $baseline = self::_getAttribute($titleDetailElement->rPr, 'baseline', 'integer');
  388. if (!is_null($baseline)) {
  389. if ($baseline > 0) {
  390. $objText->getFont()->setSuperScript(true);
  391. } elseif($baseline < 0) {
  392. $objText->getFont()->setSubScript(true);
  393. }
  394. }
  395. $underscore = (self::_getAttribute($titleDetailElement->rPr, 'u', 'string'));
  396. if (!is_null($underscore)) {
  397. if ($underscore == 'sng') {
  398. $objText->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE);
  399. } elseif($underscore == 'dbl') {
  400. $objText->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_DOUBLE);
  401. } else {
  402. $objText->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_NONE);
  403. }
  404. }
  405. $strikethrough = (self::_getAttribute($titleDetailElement->rPr, 's', 'string'));
  406. if (!is_null($strikethrough)) {
  407. if ($strikethrough == 'noStrike') {
  408. $objText->getFont()->setStrikethrough(false);
  409. } else {
  410. $objText->getFont()->setStrikethrough(true);
  411. }
  412. }
  413. }
  414. }
  415. return $value;
  416. }
  417. private static function _readChartAttributes($chartDetail) {
  418. $plotAttributes = array();
  419. if (isset($chartDetail->dLbls)) {
  420. if (isset($chartDetail->dLbls->howLegendKey)) {
  421. $plotAttributes['showLegendKey'] = self::_getAttribute($chartDetail->dLbls->showLegendKey, 'val', 'string');
  422. }
  423. if (isset($chartDetail->dLbls->showVal)) {
  424. $plotAttributes['showVal'] = self::_getAttribute($chartDetail->dLbls->showVal, 'val', 'string');
  425. }
  426. if (isset($chartDetail->dLbls->showCatName)) {
  427. $plotAttributes['showCatName'] = self::_getAttribute($chartDetail->dLbls->showCatName, 'val', 'string');
  428. }
  429. if (isset($chartDetail->dLbls->showSerName)) {
  430. $plotAttributes['showSerName'] = self::_getAttribute($chartDetail->dLbls->showSerName, 'val', 'string');
  431. }
  432. if (isset($chartDetail->dLbls->showPercent)) {
  433. $plotAttributes['showPercent'] = self::_getAttribute($chartDetail->dLbls->showPercent, 'val', 'string');
  434. }
  435. if (isset($chartDetail->dLbls->showBubbleSize)) {
  436. $plotAttributes['showBubbleSize'] = self::_getAttribute($chartDetail->dLbls->showBubbleSize, 'val', 'string');
  437. }
  438. if (isset($chartDetail->dLbls->showLeaderLines)) {
  439. $plotAttributes['showLeaderLines'] = self::_getAttribute($chartDetail->dLbls->showLeaderLines, 'val', 'string');
  440. }
  441. }
  442. return $plotAttributes;
  443. }
  444. private static function _setChartAttributes($plotArea,$plotAttributes)
  445. {
  446. foreach($plotAttributes as $plotAttributeKey => $plotAttributeValue) {
  447. switch($plotAttributeKey) {
  448. case 'showLegendKey' :
  449. $plotArea->setShowLegendKey($plotAttributeValue);
  450. break;
  451. case 'showVal' :
  452. $plotArea->setShowVal($plotAttributeValue);
  453. break;
  454. case 'showCatName' :
  455. $plotArea->setShowCatName($plotAttributeValue);
  456. break;
  457. case 'showSerName' :
  458. $plotArea->setShowSerName($plotAttributeValue);
  459. break;
  460. case 'showPercent' :
  461. $plotArea->setShowPercent($plotAttributeValue);
  462. break;
  463. case 'showBubbleSize' :
  464. $plotArea->setShowBubbleSize($plotAttributeValue);
  465. break;
  466. case 'showLeaderLines' :
  467. $plotArea->setShowLeaderLines($plotAttributeValue);
  468. break;
  469. }
  470. }
  471. }
  472. }