本文整理汇总了PHP中PHPExcel_Chart::getMinorGridlines方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPExcel_Chart::getMinorGridlines方法的具体用法?PHP PHPExcel_Chart::getMinorGridlines怎么用?PHP PHPExcel_Chart::getMinorGridlines使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPExcel_Chart
的用法示例。
在下文中一共展示了PHPExcel_Chart::getMinorGridlines方法的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();
}