You are here

private static function PHPExcel_Reader_Excel2007_Chart::_chartDataSeries in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007/Chart.php \PHPExcel_Reader_Excel2007_Chart::_chartDataSeries()
1 call to PHPExcel_Reader_Excel2007_Chart::_chartDataSeries()
PHPExcel_Reader_Excel2007_Chart::readChart in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007/Chart.php

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007/Chart.php, line 247

Class

PHPExcel_Reader_Excel2007_Chart
PHPExcel_Reader_Excel2007_Chart

Code

private static function _chartDataSeries($chartDetail, $namespacesChartMeta, $plotType) {
  $multiSeriesType = NULL;
  $smoothLine = false;
  $seriesLabel = $seriesCategory = $seriesValues = $plotOrder = array();
  $seriesDetailSet = $chartDetail
    ->children($namespacesChartMeta['c']);
  foreach ($seriesDetailSet as $seriesDetailKey => $seriesDetails) {
    switch ($seriesDetailKey) {
      case "grouping":
        $multiSeriesType = self::_getAttribute($chartDetail->grouping, 'val', 'string');
        break;
      case "ser":
        $marker = NULL;
        foreach ($seriesDetails as $seriesKey => $seriesDetail) {
          switch ($seriesKey) {
            case "idx":
              $seriesIndex = self::_getAttribute($seriesDetail, 'val', 'integer');
              break;
            case "order":
              $seriesOrder = self::_getAttribute($seriesDetail, 'val', 'integer');
              $plotOrder[$seriesIndex] = $seriesOrder;
              break;
            case "tx":
              $seriesLabel[$seriesIndex] = self::_chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta);
              break;
            case "marker":
              $marker = self::_getAttribute($seriesDetail->symbol, 'val', 'string');
              break;
            case "smooth":
              $smoothLine = self::_getAttribute($seriesDetail, 'val', 'boolean');
              break;
            case "cat":
              $seriesCategory[$seriesIndex] = self::_chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta);
              break;
            case "val":
              $seriesValues[$seriesIndex] = self::_chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker);
              break;
            case "xVal":
              $seriesCategory[$seriesIndex] = self::_chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker);
              break;
            case "yVal":
              $seriesValues[$seriesIndex] = self::_chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker);
              break;
          }
        }
    }
  }
  return new PHPExcel_Chart_DataSeries($plotType, $multiSeriesType, $plotOrder, $seriesLabel, $seriesCategory, $seriesValues, $smoothLine);
}