private static function PHPExcel_Reader_Excel2007_Chart::_chartDataSeriesValuesMultiLevel in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007/Chart.php \PHPExcel_Reader_Excel2007_Chart::_chartDataSeriesValuesMultiLevel()
1 call to PHPExcel_Reader_Excel2007_Chart::_chartDataSeriesValuesMultiLevel()
- PHPExcel_Reader_Excel2007_Chart::_chartDataSeriesValueSet in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Reader/ Excel2007/ Chart.php
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Reader/ Excel2007/ Chart.php, line 361
Class
- PHPExcel_Reader_Excel2007_Chart
- PHPExcel_Reader_Excel2007_Chart
Code
private static function _chartDataSeriesValuesMultiLevel($seriesValueSet, $dataType = 'n') {
$seriesVal = array();
$formatCode = '';
$pointCount = 0;
foreach ($seriesValueSet->lvl as $seriesLevelIdx => $seriesLevel) {
foreach ($seriesLevel as $seriesValueIdx => $seriesValue) {
switch ($seriesValueIdx) {
case 'ptCount':
$pointCount = self::_getAttribute($seriesValue, 'val', 'integer');
break;
case 'formatCode':
$formatCode = (string) $seriesValue;
break;
case 'pt':
$pointVal = self::_getAttribute($seriesValue, 'idx', 'integer');
if ($dataType == 's') {
$seriesVal[$pointVal][] = (string) $seriesValue->v;
}
else {
$seriesVal[$pointVal][] = (double) $seriesValue->v;
}
break;
}
}
}
return array(
'formatCode' => $formatCode,
'pointCount' => $pointCount,
'dataValues' => $seriesVal,
);
}