1

Is there a way to create a line chart with a dashed line in PhpOffice/PHPPresentation?

I found a solution to set the color for a line chart here:

$oOutline = new \PhpOffice\PhpPresentation\Style\Outline();
$oOutline->getFill()->setFillType(Fill::FILL_SOLID);
$oOutline->getFill()->setStartColor(new Color(Color::COLOR_YELLOW));
$oOutline->setWidth(2);

$series->setOutline($oOutline);

My first attempt was to use the different fill types - but they don't really seem to work. FILL_NONE and FILL_SOLID are fine, and FILL_GRADIENT_LINEAR also works. But FILL_GRADIENT_PATH looks exactly like FILL_GRADIENT_LINEAR. And the FILL_PATTERN constants are all just adding some dots to the line. If I try to edit this line directly in PowerPoint the "no line" option is set.

Next I was looking for a border or line setting but I couldn't fine neither for the outline or the series object.

I'm using the "dev-develop" version of the PhpOffice/PHPPresentation package.

Thanks in advance for your help!

quinz
  • 1,282
  • 4
  • 21
  • 33
Scheißy
  • 11
  • 2

0 Answers0