Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道如何更改幻灯片中的背景颜色,但我找不到如何更改图表中的背景颜色。
默认图表
我使用来自 PhpPresentation 的默认代码
任何人都可以帮忙吗?
终于我找到了答案!
只需使用此代码:
$shape->getFill()->setFillType(Fill::FILL_GRADIENT_LINEAR) ->setRotation(90) ->setStartColor(new Color('FF000000')) ->setEndColor(new Color('FFB1B1B1'));
在此代码下方
$shape->setFill($oFill);