Skip to content

Commit 533b463

Browse files
committed
fix: tests and double addShape
1 parent 9675b5b commit 533b463

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

samples/Sample_05_Chart.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function fnSlide_BarHorizontal(PhpPresentation $objPHPPresentation): void
132132

133133
// Create a bar chart (that should be inserted in a shape)
134134
echo date('H:i:s') . ' Create a horizontal bar chart (that should be inserted in a chart shape) ' . EOL;
135-
$barChartHorz = clone $objPHPPresentation->getSlide(1)->getShapeCollection()[2]->getPlotArea()->getType();
135+
$barChartHorz = clone $objPHPPresentation->getSlide(1)->getShapeCollection()[1]->getPlotArea()->getType();
136136
$barChartHorz->setBarDirection(Bar3D::DIRECTION_HORIZONTAL);
137137

138138
// Create templated slide
@@ -148,7 +148,7 @@ function fnSlide_BarHorizontal(PhpPresentation $objPHPPresentation): void
148148
->setWidth(700)
149149
->setOffsetX(120)
150150
->setOffsetY(80);
151-
$shape->setShadow($oShadow);
151+
// $shape->setShadow($oShadow);
152152
$shape->setFill($oFill);
153153
$shape->getBorder()->setLineStyle(Border::LINE_SINGLE);
154154
$shape->getTitle()->setText('PHPPresentation Monthly Downloads');
@@ -363,7 +363,7 @@ function fnSlide_Bar3DHorizontal(PhpPresentation $objPHPPresentation): void
363363

364364
// Create a bar chart (that should be inserted in a shape)
365365
echo date('H:i:s') . ' Create a horizontal bar chart (that should be inserted in a chart shape) ' . EOL;
366-
$bar3DChartHorz = clone $objPHPPresentation->getSlide(5)->getShapeCollection()[2]->getPlotArea()->getType();
366+
$bar3DChartHorz = clone $objPHPPresentation->getSlide(5)->getShapeCollection()[1]->getPlotArea()->getType();
367367
$bar3DChartHorz->setBarDirection(Bar3D::DIRECTION_HORIZONTAL);
368368

369369
// Create templated slide
@@ -379,7 +379,7 @@ function fnSlide_Bar3DHorizontal(PhpPresentation $objPHPPresentation): void
379379
->setWidth(700)
380380
->setOffsetX(120)
381381
->setOffsetY(80);
382-
$shape->setShadow($oShadow);
382+
// $shape->setShadow($oShadow);
383383
$shape->setFill($oFill);
384384
$shape->getBorder()->setLineStyle(Border::LINE_SINGLE);
385385
$shape->getTitle()->setText('PHPPresentation Monthly Downloads');

src/PhpPresentation/Slide/AbstractSlide.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ public function createChartShape(): Chart
241241
public function createDrawingShape(): File
242242
{
243243
$shape = new File();
244-
$this->addShape($shape);
245244
$shape->setContainer($this);
246245

247246
return $shape;

0 commit comments

Comments
 (0)