Skip to content

Commit

Permalink
Support defining axis color on slide
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBernskiold committed Nov 12, 2024
1 parent 8399e4f commit 989fc3e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Components/ChartShape.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ public function render(): static
$this->backgroundColor = $this->slide->chartBackgroundColor;
}

if($this->slide->chartAxisColor) {
$this->axisColor = $this->slide->chartAxisColor;
}

if (! empty($this->backgroundColor)) {
$this->shape->getFill()
->setFillType(Fill::FILL_SOLID)
Expand Down
9 changes: 9 additions & 0 deletions src/Concerns/Slides/WithChartBackground.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,19 @@ trait WithChartBackground
{
public ?string $chartBackgroundColor = null;

public ?string $chartAxisColor = null;

public function chartBackgroundColor(?string $argb): static
{
$this->chartBackgroundColor = $argb;

return $this;
}

public function chartAxisColor(?string $argb): static
{
$this->chartAxisColor = $argb;

return $this;
}
}

0 comments on commit 989fc3e

Please sign in to comment.