You are here

private static function PHPExcel_Reader_Excel2007_Chart::_chartDataSeriesValues in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007/Chart.php \PHPExcel_Reader_Excel2007_Chart::_chartDataSeriesValues()
1 call to PHPExcel_Reader_Excel2007_Chart::_chartDataSeriesValues()
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 326

Class

PHPExcel_Reader_Excel2007_Chart
PHPExcel_Reader_Excel2007_Chart

Code

private static function _chartDataSeriesValues($seriesValueSet, $dataType = 'n') {
  $seriesVal = array();
  $formatCode = '';
  $pointCount = 0;
  foreach ($seriesValueSet 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;
    }
  }
  if (empty($seriesVal)) {
    $seriesVal = NULL;
  }
  return array(
    'formatCode' => $formatCode,
    'pointCount' => $pointCount,
    'dataValues' => $seriesVal,
  );
}