Skip to content

Commit

Permalink
feat: add direct methods for chart type
Browse files Browse the repository at this point in the history
  • Loading branch information
epessine committed Feb 24, 2024
1 parent 8d44435 commit 7a758e7
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/Traits/IsFluent.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,29 @@ abstract public function type(Type $type): static;
abstract public function options(iterable $options, bool $overwrite = false): static;

abstract public function series(string $name, iterable $data, iterable $options = []): static;

public function bar(): static
{
return $this->type(Type::Bar);
}

public function pie(): static
{
return $this->type(Type::Pie);
}

public function radar(): static
{
return $this->type(Type::Radar);
}

public function line(): static
{
return $this->type(Type::Line);
}

public function column(): static
{
return $this->type(Type::Column);
}
}

0 comments on commit 7a758e7

Please sign in to comment.