如何使用PHPPowerpoint / PHPPresentation自定义折线图中的线?

时间:2015-12-17 22:12:18

标签: php phppowerpoint phppresentation

如何在PHPPowerpoint / PHPPresentation的折线图中自定义线条?我在文档或样本中找不到任何内容来解决这个问题。

这是我的代码:

// Group by Nbr & TypeCd
val groupedData = input.map(x => ((x._2, x._3), x)).groupByKey().map(x => x._2.toList)

// Within each subgroup sort based on the Amount in descending order
val sortedSubGroups = groupedData.map(x => x.sortWith(_._4 > _._4))

// Now assign ranks in each subgroups
val rankAssignedList = sortedSubGroups.map(x => assignRank(x)).flatMap(x => x)

折线图的颜色显示为蓝色,但我希望能够更改该颜色。它还显示了方形标记,但我想这样做,以便在线上没有标记。

先谢谢你。

1 个答案:

答案 0 :(得分:1)

它实际上在develop branch

但你可以这样做:

$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);
相关问题