Skip to content

Commit

Permalink
FIXED : #58 : Added support for Horizontal bar chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Progi1984 committed Dec 22, 2014
1 parent bfad16c commit 5a6b313
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/PhpPowerpoint/Writer/ODPresentation/ObjectsChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,16 +449,17 @@ private function writePlotAreaStyle(Chart $chart)
$this->xmlContent->writeAttribute('style:family', 'chart');
// style:text-properties
$this->xmlContent->startElement('style:chart-properties');
if ($chartType instanceof Bar3D || $chartType instanceof Pie3D) {
if ($chartType instanceof Bar3D) {
$this->xmlContent->writeAttribute('chart:three-dimensional', 'true');
$this->xmlContent->writeAttribute('chart:right-angled-axes', 'true');
}
if ($chartType instanceof Bar3D) {
if ($chartType->getBarDirection() == Bar3D::DIRECTION_HORIZONTAL) {
$this->xmlContent->writeAttribute('chart:vertical', 'true');
} else {
$this->xmlContent->writeAttribute('chart:vertical', 'false');
}
} elseif ($chartType instanceof Pie3D) {
$this->xmlContent->writeAttribute('chart:three-dimensional', 'true');
$this->xmlContent->writeAttribute('chart:right-angled-axes', 'true');
}
$this->xmlContent->writeAttribute('chart:data-label-number', 'value');
// > style:text-properties
Expand Down

0 comments on commit 5a6b313

Please sign in to comment.