You are here

private function PHPExcel_Writer_Excel2007_Chart::_writeDataLbls 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::_writeDataLbls()

Write Data Labels

Parameters

PHPExcel_Shared_XMLWriter $objWriter XML Writer:

PHPExcel_Chart_Layout $chartLayout Chart layout:

Throws

PHPExcel_Writer_Exception

1 call to PHPExcel_Writer_Excel2007_Chart::_writeDataLbls()
PHPExcel_Writer_Excel2007_Chart::_writePlotArea in vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Chart.php
Write Chart Plot Area

File

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

Class

PHPExcel_Writer_Excel2007_Chart
PHPExcel_Writer_Excel2007_Chart

Code

private function _writeDataLbls($objWriter, $chartLayout) {
  $objWriter
    ->startElement('c:dLbls');
  $objWriter
    ->startElement('c:showLegendKey');
  $showLegendKey = empty($chartLayout) ? 0 : $chartLayout
    ->getShowLegendKey();
  $objWriter
    ->writeAttribute('val', empty($showLegendKey) ? 0 : 1);
  $objWriter
    ->endElement();
  $objWriter
    ->startElement('c:showVal');
  $showVal = empty($chartLayout) ? 0 : $chartLayout
    ->getShowVal();
  $objWriter
    ->writeAttribute('val', empty($showVal) ? 0 : 1);
  $objWriter
    ->endElement();
  $objWriter
    ->startElement('c:showCatName');
  $showCatName = empty($chartLayout) ? 0 : $chartLayout
    ->getShowCatName();
  $objWriter
    ->writeAttribute('val', empty($showCatName) ? 0 : 1);
  $objWriter
    ->endElement();
  $objWriter
    ->startElement('c:showSerName');
  $showSerName = empty($chartLayout) ? 0 : $chartLayout
    ->getShowSerName();
  $objWriter
    ->writeAttribute('val', empty($showSerName) ? 0 : 1);
  $objWriter
    ->endElement();
  $objWriter
    ->startElement('c:showPercent');
  $showPercent = empty($chartLayout) ? 0 : $chartLayout
    ->getShowPercent();
  $objWriter
    ->writeAttribute('val', empty($showPercent) ? 0 : 1);
  $objWriter
    ->endElement();
  $objWriter
    ->startElement('c:showBubbleSize');
  $showBubbleSize = empty($chartLayout) ? 0 : $chartLayout
    ->getShowBubbleSize();
  $objWriter
    ->writeAttribute('val', empty($showBubbleSize) ? 0 : 1);
  $objWriter
    ->endElement();
  $objWriter
    ->startElement('c:showLeaderLines');
  $showLeaderLines = empty($chartLayout) ? 1 : $chartLayout
    ->getShowLeaderLines();
  $objWriter
    ->writeAttribute('val', empty($showLeaderLines) ? 0 : 1);
  $objWriter
    ->endElement();
  $objWriter
    ->endElement();
}