fix formatting
This commit is contained in:
parent
31968fa814
commit
5b688d50d8
|
|
@ -51,8 +51,8 @@ class Chart extends AbstractStyle
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private $colors = array();
|
private $colors = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Chart title
|
* Chart title
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
|
|
@ -111,9 +111,15 @@ class Chart extends AbstractStyle
|
||||||
*/
|
*/
|
||||||
private $valueAxisTitle;
|
private $valueAxisTitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The position for major tick marks
|
||||||
|
* Possible values are 'in', 'out', 'cross', 'none'
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
private $majorTickMarkPos = 'none';
|
private $majorTickMarkPos = 'none';
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Show labels for axis
|
* Show labels for axis
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
|
|
@ -234,7 +240,7 @@ class Chart extends AbstractStyle
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the chart title
|
* Get the chart title
|
||||||
*
|
*
|
||||||
|
|
@ -248,7 +254,7 @@ class Chart extends AbstractStyle
|
||||||
/**
|
/**
|
||||||
* Set the chart title
|
* Set the chart title
|
||||||
*
|
*
|
||||||
* @param string $value
|
* @param string $value
|
||||||
*/
|
*/
|
||||||
public function setTitle($value = null)
|
public function setTitle($value = null)
|
||||||
{
|
{
|
||||||
|
|
@ -262,7 +268,7 @@ class Chart extends AbstractStyle
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function getShowLegend()
|
public function isShowLegend()
|
||||||
{
|
{
|
||||||
return $this->showLegend;
|
return $this->showLegend;
|
||||||
}
|
}
|
||||||
|
|
@ -270,7 +276,7 @@ class Chart extends AbstractStyle
|
||||||
/**
|
/**
|
||||||
* Set chart legend visibility
|
* Set chart legend visibility
|
||||||
*
|
*
|
||||||
* @param bool $value
|
* @param bool $value
|
||||||
*/
|
*/
|
||||||
public function setShowLegend($value = false)
|
public function setShowLegend($value = false)
|
||||||
{
|
{
|
||||||
|
|
@ -452,8 +458,8 @@ class Chart extends AbstractStyle
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set the position for major tick marks
|
* Set the position for major tick marks
|
||||||
* @param string $position [description]
|
* @param string $position
|
||||||
*/
|
*/
|
||||||
public function setMajorTickPosition($position)
|
public function setMajorTickPosition($position)
|
||||||
{
|
{
|
||||||
|
|
@ -461,7 +467,7 @@ class Chart extends AbstractStyle
|
||||||
$this->majorTickMarkPos = $this->setEnumVal($position, $enum, $this->majorTickMarkPos);
|
$this->majorTickMarkPos = $this->setEnumVal($position, $enum, $this->majorTickMarkPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Show Gridlines for X-Axis
|
* Show Gridlines for X-Axis
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
|
|
||||||
|
|
@ -128,12 +128,12 @@ class Chart extends AbstractPart
|
||||||
$type = $this->element->getType();
|
$type = $this->element->getType();
|
||||||
$style = $this->element->getStyle();
|
$style = $this->element->getStyle();
|
||||||
$this->options = $this->types[$type];
|
$this->options = $this->types[$type];
|
||||||
|
|
||||||
$title = $style->getTitle();
|
$title = $style->getTitle();
|
||||||
$showLegend = $style->getShowLegend();
|
$showLegend = $style->isShowLegend();
|
||||||
|
|
||||||
//Chart title
|
//Chart title
|
||||||
if($title){
|
if ($title) {
|
||||||
$xmlWriter->startElement('c:title');
|
$xmlWriter->startElement('c:title');
|
||||||
$xmlWriter->startElement('c:tx');
|
$xmlWriter->startElement('c:tx');
|
||||||
$xmlWriter->startElement('c:rich');
|
$xmlWriter->startElement('c:rich');
|
||||||
|
|
@ -142,20 +142,18 @@ class Chart extends AbstractPart
|
||||||
<a:lstStyle/>
|
<a:lstStyle/>
|
||||||
<a:p>
|
<a:p>
|
||||||
<a:pPr>
|
<a:pPr>
|
||||||
<a:defRPr/></a:pPr><a:r><a:rPr/><a:t>'.$title.'</a:t></a:r>
|
<a:defRPr/></a:pPr><a:r><a:rPr/><a:t>' . $title . '</a:t></a:r>
|
||||||
<a:endParaRPr/>
|
<a:endParaRPr/>
|
||||||
</a:p>');
|
</a:p>');
|
||||||
|
|
||||||
$xmlWriter->endElement(); // c:rich
|
$xmlWriter->endElement(); // c:rich
|
||||||
$xmlWriter->endElement(); // c:tx
|
$xmlWriter->endElement(); // c:tx
|
||||||
$xmlWriter->endElement(); // c:title
|
$xmlWriter->endElement(); // c:title
|
||||||
|
} else {
|
||||||
}else{
|
|
||||||
$xmlWriter->writeElementBlock('c:autoTitleDeleted', 'val', 1);
|
$xmlWriter->writeElementBlock('c:autoTitleDeleted', 'val', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Chart legend
|
//Chart legend
|
||||||
if($showLegend){
|
if ($showLegend) {
|
||||||
$xmlWriter->writeRaw('<c:legend><c:legendPos val="r"/></c:legend>');
|
$xmlWriter->writeRaw('<c:legend><c:legendPos val="r"/></c:legend>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue