当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPExcel_Chart::refresh方法代码示例

本文整理汇总了PHP中PHPExcel_Chart::refresh方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPExcel_Chart::refresh方法的具体用法?PHP PHPExcel_Chart::refresh怎么用?PHP PHPExcel_Chart::refresh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPExcel_Chart的用法示例。


在下文中一共展示了PHPExcel_Chart::refresh方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: writeChart

 /**
  * Write charts to XML format
  *
  * @param  PHPExcel_Chart $pChart
  *
  * @return  string            XML Output
  * @throws  PHPExcel_Writer_Exception
  */
 public function writeChart(PHPExcel_Chart $pChart = null, $calculateCellValues = true)
 {
     $this->calculateCellValues = $calculateCellValues;
     // Create XML writer
     $objWriter = null;
     if ($this->getParentWriter()->getUseDiskCaching()) {
         $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());
     } else {
         $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY);
     }
     //    Ensure that data series values are up-to-date before we save
     if ($this->calculateCellValues) {
         $pChart->refresh();
     }
     // XML header
     $objWriter->startDocument('1.0', 'UTF-8', 'yes');
     // c:chartSpace
     $objWriter->startElement('c:chartSpace');
     $objWriter->writeAttribute('xmlns:c', 'http://schemas.openxmlformats.org/drawingml/2006/chart');
     $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main');
     $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships');
     $objWriter->startElement('c:date1904');
     $objWriter->writeAttribute('val', 0);
     $objWriter->endElement();
     $objWriter->startElement('c:lang');
     $objWriter->writeAttribute('val', "en-GB");
     $objWriter->endElement();
     $objWriter->startElement('c:roundedCorners');
     $objWriter->writeAttribute('val', 0);
     $objWriter->endElement();
     $this->writeAlternateContent($objWriter);
     $objWriter->startElement('c:chart');
     $this->writeTitle($pChart->getTitle(), $objWriter);
     $objWriter->startElement('c:autoTitleDeleted');
     $objWriter->writeAttribute('val', 0);
     $objWriter->endElement();
     $this->writePlotArea($pChart->getPlotArea(), $pChart->getXAxisLabel(), $pChart->getYAxisLabel(), $objWriter, $pChart->getWorksheet(), $pChart->getChartAxisX(), $pChart->getChartAxisY(), $pChart->getMajorGridlines(), $pChart->getMinorGridlines());
     $this->writeLegend($pChart->getLegend(), $objWriter);
     $objWriter->startElement('c:plotVisOnly');
     $objWriter->writeAttribute('val', 1);
     $objWriter->endElement();
     $objWriter->startElement('c:dispBlanksAs');
     $objWriter->writeAttribute('val', "gap");
     $objWriter->endElement();
     $objWriter->startElement('c:showDLblsOverMax');
     $objWriter->writeAttribute('val', 0);
     $objWriter->endElement();
     $objWriter->endElement();
     $this->writePrintSettings($objWriter);
     $objWriter->endElement();
     // Return
     return $objWriter->getData();
 }
开发者ID:satheesanpv,项目名称:IP-Valuation,代码行数:61,代码来源:Chart.php


注:本文中的PHPExcel_Chart::refresh方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。