Skip to content

Commit

Permalink
Support passing in ChartTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBernskiold committed Aug 30, 2024
1 parent 5585d03 commit 48b77de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Concerns/ConfiguresChartType.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ trait ConfiguresChartType
{
public ?string $type = null;

public function type(string $type): self
public function type(ChartTypes|string $type): self
{
$this->type = $type;
$this->type = $type instanceof ChartTypes ? $type->value : $type;

return $this;
}
Expand Down

0 comments on commit 48b77de

Please sign in to comment.