You are here

private function PHPExcel_Writer_Excel2007_Chart::_writePlotSeriesLabel in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Chart.php \PHPExcel_Writer_Excel2007_Chart::_writePlotSeriesLabel()

Write Plot Series Label

Parameters

PHPExcel_Chart_DataSeriesValues $plotSeriesLabel:

PHPExcel_Shared_XMLWriter $objWriter XML Writer:

Throws

PHPExcel_Writer_Exception

1 call to PHPExcel_Writer_Excel2007_Chart::_writePlotSeriesLabel()
PHPExcel_Writer_Excel2007_Chart::_writePlotGroup in vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Chart.php
Write Plot Group (series of related plots)

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Chart.php, line 1301

Class

PHPExcel_Writer_Excel2007_Chart
PHPExcel_Writer_Excel2007_Chart

Code

private function _writePlotSeriesLabel($plotSeriesLabel, $objWriter) {
  if (is_null($plotSeriesLabel)) {
    return;
  }
  $objWriter
    ->startElement('c:f');
  $objWriter
    ->writeRawData($plotSeriesLabel
    ->getDataSource());
  $objWriter
    ->endElement();
  $objWriter
    ->startElement('c:strCache');
  $objWriter
    ->startElement('c:ptCount');
  $objWriter
    ->writeAttribute('val', $plotSeriesLabel
    ->getPointCount());
  $objWriter
    ->endElement();
  foreach ($plotSeriesLabel
    ->getDataValues() as $plotLabelKey => $plotLabelValue) {
    $objWriter
      ->startElement('c:pt');
    $objWriter
      ->writeAttribute('idx', $plotLabelKey);
    $objWriter
      ->startElement('c:v');
    $objWriter
      ->writeRawData($plotLabelValue);
    $objWriter
      ->endElement();
    $objWriter
      ->endElement();
  }
  $objWriter
    ->endElement();
}